Petya loves lucky numbers. Everybody knows that lucky numbers are positive integers whose decimal representation contains only the lucky digits 4 and 7. For example, numbers 47, 744, 4 are lucky and 5, 17, 467 are not.

One day Petya was delivered a string *s*, containing only digits. He needs to find a string that
-  represents a lucky number without leading zeroes,-  is not empty,-  is contained in *s* as a substring the maximum number of times.
Among all the strings for which the three conditions given above are fulfilled, Petya only needs the lexicographically minimum one. Find this string for Petya.
The single line contains a non-empty string *s* whose length can range from 1 to 50, inclusive. The string only contains digits. The string can contain leading zeroes.
047
4
16
-1
472747
7
1925
-1
5486846414848445484
4
516160414
4
9458569865994896
4
94894948577777777884888
7
00000
-1
9589
-1
7665711
7
538772857
7
8679647744
4
23607019991994
4
86145305734278927901987281894864719533015270066521
7
22438808523154336905543301642540261833729318191
4
290732082244359495795943967215788554387079
7
6363333480463521971676988087733137609715
7
637789221789855555993957058
7
11536708648794535307468278326553811
7
619433861636130069773
7
7
7
00000000000000000000000000000000000000000000000000
-1
0000000000000000000000000000000000000047
4
8175012266795100056032281135654854227489558885698
4
8862708665262955384044574268728167940741129
4
538772857
7
94872076199824813574576121510803
7
44101164480392494025995467
4
0445460407410702955646485
4
91076008557028243309
7
33120039
-1
4
4
74747474747474747474747474747474747474747474747474
4
74747474747474747474747774747474747474747474747474
7
74747474747474747474747474747474744474747474747474
4
47474747474747474747474747474747474747474747474747
4
40
4
07
7
007
7
44
4
74
4
a=input()
a4=0
a7=0
for i in range(len(a)):
    if a[i]=='4':
        a4+=1
    elif a[i]=='7':
        a7+=1
if a4>=a7:
    if a4!=0:
        print(4)
    else:
        print(-1)
else:
    print(7)