using System; using System.Collections.Generic; using System.Linq; using static System.Console; class Program { static void Main() { #if a var nkp = ReadLine().Split(); var N = int.Parse(nkp[0]); var K = int.Parse(nkp[1]); var P = long.Parse(nkp[2]); if (P > 21325334000) WriteLine(0); var tri = new int[N][]; for (int i = 0; i < N; i++) tri[i] = new int[i + 1]; for (int i = 0; i < K; i++) { var p = ReadLine().Split().Select(int.Parse).ToArray(); } #endif var abs = ReadLine().Split(); var a = int.Parse(abs[0]); var b = int.Parse(abs[1]); var s = double.Parse(abs[2].Substring(3)); WriteLine($"{new DateTime(2000, 10, 1, a, b, 0) + TimeSpan.FromHours(s - 9):HH:mm}"); } }