#include <bits/stdc++.h>
using namespace std;
const double PI = acos(-1.);
int min(int a, int b) { return (a > b ? b : a); }
int max(int a, int b) { return (a > b ? a : b); }
int abs(int a) { return (a < 0 ? -a : a); }
void sort(long long a[], int l, int r);
int main() {
  char ch[2], m[2];
  cin >> ch[0] >> ch[1] >> m[0] >> m[0] >> m[1];
  while (1) {
    m[1]++;
    if (m[1] > '9') {
      m[1] -= 10;
      m[0]++;
      if (m[0] > '5') {
        m[0] -= 6;
        ch[1]++;
        if (ch[1] > '9' || ch[0] == '2' && ch[1] > '3') {
          ch[1] = '0';
          ch[0]++;
          if (ch[0] > '2') ch[0] = '0';
        }
      }
    }
    if (ch[0] == m[1] && ch[1] == m[0]) break;
  }
  cout << ch[0] << ch[1] << ":" << m[0] << m[1] << endl;
  return 0;
}
void sort(long long a[], int l, int r) {
  int i = l, j = r;
  long long x, tmp;
  x = a[(l + r) / 2];
  while (i < j) {
    while (a[i] < x) i++;
    while (a[j] > x) j--;
    if (i <= j) {
      tmp = a[i];
      a[i] = a[j];
      a[j] = tmp;
      i++;
      j--;
    }
  }
  if (j > l) sort(a, l, j);
  if (r > i) sort(a, i, r);
}
