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
//package com.ahashem.active;

import java.io.*;
import java.util.StringTokenizer;

public class PalindromicTimes {

    public static void main(String[] args) {
        int t = 1; // sc.nextInt();

        StringBuilder builder = new StringBuilder();
        while (t-- > 0) {
            solve(builder);
        }

        out.println(builder.toString());

        out.close();
    }

    private static void solve(StringBuilder builder) {
        final String startTime = sc.next();
        String[] split = startTime.split(":");
        int[] hours = {Integer.parseInt(String.valueOf(split[0].charAt(0))), Integer.parseInt(String.valueOf(split[0].charAt(1)))};
        int[] minutes = {Integer.parseInt(String.valueOf(split[1].charAt(0))), Integer.parseInt(String.valueOf(split[1].charAt(1)))};

        while (true) {
            if (minutes[1] == 9) {
                if (minutes[0] == 5) {
                    if (hours[1] == 3) {
                        if (hours[0] == 2) {
                            hours[0] = 0;
                            hours[1] = 0;
                            minutes[0] = 0;
                            minutes[1] = 0;
                        } else {
                            hours[1]++;
                            minutes[0] = 0;
                            minutes[1] = 0;
                        }
                    } else if (hours[1] == 9) {
                        hours[1] = 0;
                        hours[0]++;
                        minutes[0] = 0;
                        minutes[1] = 0;
                    } else {
                        minutes[0] = 0;
                        minutes[1] = 0;
                        hours[1]++;
                    }
                } else {
                    minutes[1] = 0;
                    minutes[0]++;
                }
            } else {
                minutes[1]++;
            }

            if (hours[0] == minutes[1] && hours[1] == minutes[0]) {
                builder.append(hours[0]).append(hours[1]).append(":").append(minutes[0]).append(minutes[1]);
                return;
            }
        }
    }

    // Helpers

    // Math
    private static boolean isEven(int a) {
        return a % 2 == 0;
    }

    private static int gcd(int a, int b) {
        if (a == 0) {
            return b;
        }

        return gcd(b % a, a);
    }

    // IO
    public static PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out));
    static final FastScanner sc = new FastScanner();

    public static class FastScanner {

        BufferedReader br;
        StringTokenizer st;

        public FastScanner() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
        // 1 2 2 2
    }

    private static String twoDimArrayToString(Object[][] array) {
        return twoDimArrayToString(array, " ");
    }

    private static String twoDimArrayToString(Object[][] array, String separator) {
        StringBuilder stringBuilder = new StringBuilder();
        for (int i = 0; i < array.length; i++) {
            for (int j = 0; j < array[i].length; j++) {
                stringBuilder.append(array[i][j]);
                if (array.length != 1) {
                    if (j < array[i].length - 1) {
                        stringBuilder.append(separator);
                    }
                }
            }
            if (i < array.length - 1) {
                stringBuilder.append("\n");
            }
        }

        return stringBuilder.toString();
    }
}