now = gets.split(":").map(&:to_i) now[1] += 5 if now[0] == 23 && now[1] >= 55 now[0] = 0 now[1] = now[1] % 60 end print format("%02d:", now[0]) print format("%02d\n", now[1])