#include <bits/stdc++.h>
using namespace std;
int main() {
  string s, h = "", m = "";
  cin >> s;
  h += s[0];
  h += s[1];
  m += s[3];
  m += s[4];
  if (h == "00")
    cout << "01:10" << endl;
  else if (h == "01" && m[0] == '0')
    cout << "01:10" << endl;
  else if (h == "01" && m[0] == '1' && m[1] == '0')
    cout << "01:10" << endl;
  else if (h == "01")
    cout << "02:20" << endl;
  else if (h == "02" && m[0] == '1')
    cout << "02:20" << endl;
  else if (h == "02" && m[0] == '0')
    cout << "02:20" << endl;
  else if (h == "02")
    cout << "03:30" << endl;
  else if (h == "03" && m[0] == '0')
    cout << "03:30" << endl;
  else if (h == "03" && m[0] == '1')
    cout << "03:30" << endl;
  else if (h == "03" && m[0] == '2')
    cout << "03:30" << endl;
  else if (h == "03")
    cout << "04:40" << endl;
  else if (h == "04" && m[0] == '0')
    cout << "04:40" << endl;
  else if (h == "04" && m[0] == '1')
    cout << "04:40" << endl;
  else if (h == "04" && m[0] == '2')
    cout << "04:40" << endl;
  else if (h == "04" && m[0] == '3')
    cout << "04:40" << endl;
  else if (h == "04")
    cout << "05:50" << endl;
  else if (h == "05" && m[0] == '1')
    cout << "05:50" << endl;
  else if (h == "05" && m[0] == '0')
    cout << "05:50" << endl;
  else if (h == "05" && m[0] == '2')
    cout << "05:50" << endl;
  else if (h == "05" && m[0] == '3')
    cout << "05:50" << endl;
  else if (h == "05" && m[0] == '4')
    cout << "05:50" << endl;
  else if (h == "05" || h == "06" || h == "07" || h == "08" || h == "09")
    cout << "10:01" << endl;
  else if (h == "10" && m[0] == '0' && m[1] == '0')
    cout << "10:01" << endl;
  else if (h == "10")
    cout << "11:11" << endl;
  else if (h == "11" && m[0] == '0')
    cout << "11:11" << endl;
  else if (h == "11" && m[0] == '1' && m[1] == '0')
    cout << "11:11" << endl;
  else if (h == "11")
    cout << "12:21" << endl;
  else if (h == "12" && m[0] == '0')
    cout << "12:21" << endl;
  else if (h == "12" && m[0] == '1')
    cout << "12:21" << endl;
  else if (h == "12" && m[0] == '2' && m[1] == '0')
    cout << "12:21" << endl;
  else if (h == "12")
    cout << "13:31" << endl;
  else if (h == "13" && m[0] == '0')
    cout << "13:31" << endl;
  else if (h == "13" && m[0] == '1')
    cout << "13:31" << endl;
  else if (h == "13" && m[0] == '2')
    cout << "13:31" << endl;
  else if (h == "13" && m[0] == '3' && m[1] == '0')
    cout << "13:31" << endl;
  else if (h == "13")
    cout << "14:41" << endl;
  else if (h == "14" && m[0] == '0')
    cout << "14:41" << endl;
  else if (h == "14" && m[0] == '1')
    cout << "14:41" << endl;
  else if (h == "14" && m[0] == '2')
    cout << "14:41" << endl;
  else if (h == "14" && m[0] == '3')
    cout << "14:41" << endl;
  else if (h == "14" && m[0] == '4' && m[1] == '0')
    cout << "14:41" << endl;
  else if (h == "14")
    cout << "15:51" << endl;
  else if (h == "15" && m[0] == '0')
    cout << "15:51" << endl;
  else if (h == "15" && m[0] == '1')
    cout << "15:51" << endl;
  else if (h == "15" && m[0] == '2')
    cout << "15:51" << endl;
  else if (h == "15" && m[0] == '3')
    cout << "15:51" << endl;
  else if (h == "15" && m[0] == '4')
    cout << "15:51" << endl;
  else if (h == "15" && m[0] == '5' && m[1] == '0')
    cout << "15:51" << endl;
  else if (h == "15" || h == "16" || h == "17" || h == "18" || h == "19")
    cout << "20:02" << endl;
  else if (h == "20" && m[0] == '0' && m[1] == '1')
    cout << "20:02" << endl;
  else if (h == "20")
    cout << "21:12" << endl;
  else if (h == "21" && m[0] == '0')
    cout << "21:12" << endl;
  else if (h == "21" && m[0] == '1' && m[1] == '1')
    cout << "21:12" << endl;
  else if (h == "21")
    cout << "22:22" << endl;
  else if (h == "22" && m[0] == '0')
    cout << "22:22" << endl;
  else if (h == "22" && m[0] == '1')
    cout << "22:22" << endl;
  else if (h == "22" && m[0] == '2' && m[1] == '0')
    cout << "22:22" << endl;
  else if (h == "22" && m[0] == '2' && m[1] == '1')
    cout << "22:22" << endl;
  else if (h == "22")
    cout << "23:32" << endl;
  else if (h == "23" && m[0] == '0')
    cout << "23:32" << endl;
  else if (h == "23" && m[0] == '1')
    cout << "23:32" << endl;
  else if (h == "23" && m[0] == '2')
    cout << "23:32" << endl;
  else if (h == "23" && m[0] == '3' && m[1] == '0')
    cout << "23:32" << endl;
  else if (h == "23" && m[0] == '3' && m[1] == '1')
    cout << "23:32" << endl;
  else if (h == "23")
    cout << "00:00" << endl;
  return 0;
}
