123#include <bits/stdc++.h> using namespace std; int main(){ string a,b=""; int n; cin>>a; n=a.size(); while(n>0){ b=a[0]; a.erase(0,1); if(a.find(b)!=-1){ cout<<b; return 0; } n--; } }