import java.util.*;
class Main{
public static void main(String[] args) {
int a[]=new int [26];
Scanner in =new Scanner(System.in);
int ans=0;
String s=in.next();
char t=’a’; for(int i=0;i[HTML_REMOVED]ans) {
ans=a[i];
}
}
for(int i=0;i<a.length;i++) {
if(a[i]==ans) {
t=(char)(‘a’+i);
break;
}
}
System.out.println(t);
System.out.println(ans);
}
}