s=input()
a,b,c,d=map(int,input().split())
if(a!=0):
    print(s[:a]+'"'+s[a:b]+'"'+s[b:c]+'"'+s[c:d]+'"'+s[d:])
else:
    print('"'+s[:b]+'"'+s[b:c]+'"'+s[c:d]+'"'+s[d:])
5bde2838ac2fb84017da842b35073183e8195376
<mask token>

<mask token>
if a != 0:
    print(s[:a] + '"' + s[a:b] + '"' + s[b:c] + '"' + s[c:d] + '"' + s[d:])
else:
    print('"' + s[:b] + '"' + s[b:c] + '"' + s[c:d] + '"' + s[d:])

s = input()
a, b, c, d = map(int, input().split())
if a != 0:
    print(s[:a] + '"' + s[a:b] + '"' + s[b:c] + '"' + s[c:d] + '"' + s[d:])
else:
    print('"' + s[:b] + '"' + s[b:c] + '"' + s[c:d] + '"' + s[d:])

s=input()
a,b,c,d=map(int,input().split())
if(a!=0):
    print(s[:a]+'"'+s[a:b]+'"'+s[b:c]+'"'+s[c:d]+'"'+s[d:])
else:
    print('"'+s[:b]+'"'+s[b:c]+'"'+s[c:d]+'"'+s[d:])