#include <bits/stdc++.h>
using namespace std;
bool isPol(int a, int b, int c, int d) { return ((a == d) && (b == c)); }
void next(int &a, int &b, int &c, int &d) {
  if (d != 9) {
    d++;
    return;
  }
  d = 0;
  if (c != 5) {
    ++c;
    return;
  }
  c = 0;
  if ((b != 3) && (b != 9)) {
    b++;
    return;
  }
  if (b == 3) {
    if (a != 2) {
      b++;
      return;
    }
    a = 0;
    b = 0;
    return;
  }
  b = 0;
  a++;
  return;
}
int main() {
  int a, b, c, d;
  string str;
  getline(cin, str);
  a = str[0] - '0';
  b = str[1] - '0';
  c = str[3] - '0';
  d = str[4] - '0';
  do {
    next(a, b, c, d);
  } while (!isPol(a, b, c, d));
  cout << a << b << ':' << c << d;
  return 0;
}
