Tattah is asleep if and only if Tattah is attending a lecture. This is a well-known formula among Tattah's colleagues.

On a Wednesday afternoon, Tattah was attending Professor HH's lecture. At 12:21, right before falling asleep, he was staring at the digital watch around Saher's wrist. He noticed that the digits on the clock were the same when read from both directions i.e. a palindrome.

In his sleep, he started dreaming about such rare moments of the day when the time displayed on a digital clock is a palindrome. As soon as he woke up, he felt destined to write a program that finds the next such moment.

However, he still hasn't mastered the skill of programming while sleeping, so your task is to help him.

Input

The first and only line of the input starts with a string with the format "HH:MM" where "HH" is from "00" to "23" and "MM" is from "00" to "59". Both "HH" and "MM" have exactly two digits.

Output

Print the palindromic time of day that comes soonest after the time given in the input. If the input time is palindromic, output the soonest palindromic time after the input time.

Examples

Input

12:21


Output

13:31


Input

23:59


Output

00:00
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.StringTokenizer;

public class coderfoces_108_A implements Runnable {

    private BufferedReader br = null;
    private PrintWriter pw = null;
    private StringTokenizer stk = new StringTokenizer("");

    public static void main(String[] lala) {
        (new Thread(new coderfoces_108_A())).run();
    }

    public void nline() {
        try {
            while (!stk.hasMoreTokens()) {
                stk = new StringTokenizer(br.readLine());
            }
        } catch (Throwable e) {
            throw new RuntimeException("I wanna be cousmonout", e);
        }

    }

    public String nstr() {
        nline();
        return stk.nextToken();
    }

    public int ni() {
        nline();
        return Integer.valueOf(nstr());
    }

    public double nd() {
        nline();
        return Double.valueOf(nstr());
    }

    public BigInteger nbi() {
        nline();
        return new BigInteger(nstr());
    }

    public void run() {

        br = new BufferedReader(new InputStreamReader(System.in));
        pw = new PrintWriter(System.out);

        solve();
        pw.close();
    }

    void check(int a, int b) {
        String s1 = String.valueOf(a), s2 = String.valueOf(b);
        if (s1.length() == 1)
            s1 = "0" + s1;
        if (s2.length() == 1)
            s2 = "0" + s2;
        String s3 = ((String.valueOf(s2.charAt(1))) + (String.valueOf(s2
                .charAt(0))));
        if (s1.equals(s3)) {
            System.out.println(s1 + ":" + s2);
            exit();

        }
        
    }

    public void solve() {
        String s = nstr();
        int h = Integer.valueOf(s.substring(0, 2)), m = Integer.valueOf(s
                .substring(3, 5));
        while (true) {
            m++;
            if (m == 60) {
                m = 0;
                h++;
            }
            if (h == 24) {
                h = 0;
            
            }
            check(h,m);
        }

    }

    public void exit() {
        System.exit(0);
    }

}
