using System; using System.Collections.Generic; using System.Linq; using static System.Console; class Program { static void Main() { var abs = ReadLine().Split(); var a = int.Parse(abs[0]); var b = int.Parse(abs[1]); var n = new DateTimeOffset(2000, 10, 1, a, b, 0, new TimeSpan(+9, 0, 0)); n = n.ToOffset(new TimeSpan((int)decimal.Parse(abs[2].Substring(3)), abs[2].Contains('.') ? int.Parse(abs[2].Last() + "") * 6 : 0, 0)); WriteLine($"{n:HH:mm}"); } }