C = list(map(str, input().split())) res = '' import copy temp = copy.copy(C) for i, c in enumerate(temp): if c == '?': temp[i] = '1' temp = [int(t) for t in temp] if temp[1] == max(temp) or temp[1] == min(temp): res += '1' temp = copy.copy(C) for i, c in enumerate(temp): if c == '?': temp[i] = '4' temp = [int(t) for t in temp] if temp[1] == max(temp) or temp[1] == min(temp): res += '4' print(res)