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
#include <bits/stdc++.h>
using namespace std;
vector<long long> v;
vector<long long> vv;
set<long long> st;
long long x, y, z;
string s, s1, s2;
void memset_ll(long long a[], long long v, long long n) {
  for (long long i = 0; i < n; i++) a[i] = v;
}
void memset_s(char a[], char v, long long n) {
  for (long long i = 0; i < n; i++) a[i] = v;
}
int compare(const void* a, const void* b) {
  return (*(long long*)a - *(long long*)b);
}
void q_sort(long long a[], long long n) {
  qsort(a, n, sizeof(long long), compare);
}
static int compare1(const void* a, const void* b) {
  if (*(double*)a > *(double*)b)
    return 1;
  else if (*(double*)a < *(double*)b)
    return -1;
  else
    return 0;
}
void q_sort_d(double a[], long long n) {
  qsort(a, n, sizeof(double), compare1);
}
long long sum(long long n) {
  long long i = 0, a[6], j, k = 0;
  while (n > 0) {
    a[i] = n % 10;
    n /= 10;
    i++;
  }
  for (j = 0; j < i; j++) k += a[j];
  return k;
}
string trans_upper(string ss) {
  transform(ss.begin(), ss.end(), ss.begin(), ::toupper);
  return ss;
}
long long power(long long a, long long b) {
  long long pow = 1;
  while (b) {
    if (b & 1) {
      pow = pow * a;
      --b;
    }
    a = a * a;
    b = b / 2;
  }
  return pow;
}
long long fact(long long n) {
  long long f = 1, i;
  for (i = 1; i <= n; i++) f = f * i;
  return f;
}
long long is_prime(long long n) {
  long long i, j, k = 1;
  for (i = 2; i <= n / 2; i++) {
    if (n % i == 0) {
      k = 0;
      break;
    }
  }
  return k;
}
int main() {
  long long t, l, p, q, n, m, o = 0, r, i, j, h, k, e = 0, d = 0, f = 0, g = 0;
  long long temp = 0, nl, np;
  double p1, p2, p3, p4, p5, p6, pp, ppp;
  cin >> s;
  l = s[3] - 48;
  o = s[4] - 48;
  m = l * 10 + o;
  l = s[0] - 48;
  o = s[1] - 48;
  h = l * 10 + o;
  while (1) {
    m++;
    if (m == 60) {
      m = 0;
      h++;
      if (h == 24) h = 0;
    }
    p = h;
    q = m;
    if (h < 10) {
      s1[0] = '0';
      s1[1] = h + 48;
    } else {
      g = p % 10;
      s1[1] = g + 48;
      p = p / 10;
      g = p % 10;
      s1[0] = g + 48;
    }
    if (m < 10) {
      s1[3] = '0';
      s1[4] = m + 48;
    } else {
      g = q % 10;
      s1[4] = g + 48;
      q = q / 10;
      g = q % 10;
      s1[3] = g + 48;
    }
    s1[2] = ':';
    for (i = 0; i < 3; i++) {
      f = 0;
      if (s1[i] != s1[4 - i]) {
        f = 1;
        break;
      }
    }
    if (f == 0) {
      for (i = 0; i < 5; i++) cout << s1[i];
      return 0;
    }
  }
  return 0;
}
