n, m, q = [int(x) for x in input().split(' ')]

desks = [int(x) for x in input().split(' ')]
monitors = [int(x) for x in input().split(' ')]

monitors_total = [x for x in monitors]
desks_total = [x for x in desks]

neighbors = {}
for i in range(n):
    neighbors[i] = []

for _ in range(m):
    a, b = [int(x) for x in input().split(' ')]
    neighbors[a - 1].append(b)
    neighbors[b - 1].append(a)

for i in range(n):
    monitors_total[i] += sum([monitors[x - 1] for x in neighbors[i]])
    desks_total[i] += sum([desks[x - 1] for x in neighbors[i]])
    
# print(monitors_total)
# print(desks_total)

for _ in range(q):
    ins = input().split(' ')
    if ins[0] == 'check':
        i = int(ins[1])
        m = monitors_total[i - 1]
        d = desks_total[i - 1]
        # print(m, d)
        if m > d:
            print('monitors')
        elif m == d:
            print('same')
        else:
            print('desks')
    elif ins[0] == 'add':
        inc = int(ins[1])
        i = int(ins[3])
        if ins[2] == 'monitor':
            monitors_total[i - 1] += inc
            for x in neighbors[i - 1]:
                monitors_total[x - 1] += inc
        else:
            desks_total[i - 1] += inc
            for x in neighbors[i - 1]:
                desks_total[x - 1] += inc
