import java.util.Scanner;
class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int h1=sc.nextInt();
        int m1=sc.nextInt();
        int s1=sc.nextInt();
        int h2=sc.nextInt();
        int m2=sc.nextInt();
        int ss2 =sc.nextInt();
        if (h1 < 0 || h1 >= 24 || m1 < 0 || m1 >= 60 || s1 < 0 || s1 >= 60 ||
            h2 < 0 || h2 >= 24 || m2 < 0 || m2 >= 60 || s2 < 0 || s2 >= 60) {
            System.out.println("Invalid Input");
            return;
        }
        int ts1 = h1 * 3600 + m1 * 60 + s1;
        int ts2 = h2 * 3600 + m2 * 60 + s2;
        int diff=ts1-ts2;
        int diffHours = diff / 3600;
        diff %= 3600;
        int diffMinutes = diff / 60;
        int diffSeconds = diff % 60;
        System.out.printf("%02d:%02d:%02d\n", diffHours, diffMinutes, diffSeconds);
    }
}

