import sys

def do_check(which, edges, desks, monitors):

    totalm = 0
    totald = 0
    for edge in edges[which]:
        totalm += monitors[edge]
        totald += desks[edge]

    totalm += monitors[which]
    totald += desks[which]

    if totalm > totald:
        sys.stdout.write("monitors\n")
    elif totald > totalm:
        sys.stdout.write("desks\n")
    else:
        sys.stdout.write("same\n")

if __name__ == "__main__":

    line = [int(x) for x in sys.stdin.readline().rstrip("\n").split()]

    N, M, Q = line[0], line[1], line[2]

    desks = [int(x) for x in sys.stdin.readline().rstrip("\n").split()]
    monitors = [int(x) for x in sys.stdin.readline().rstrip("\n").split()]

    edges = [ [] for _ in range(N) ]

    for _ in range(M):
        line = [int(x) for x in sys.stdin.readline().rstrip("\n").split()]
        a, b = line[0], line[1]
        a -= 1
        b -= 1

        edges[a].append(b)
        edges[b].append(a)

    for _ in range(Q):

        query = sys.stdin.readline().rstrip("\n")

        tokens = query.split()

        if tokens[0] == "check":
            do_check( int(tokens[1]) - 1, edges, desks, monitors )
        else:
            count = int(tokens[1])

            if tokens[2] == "desk":
                desks[ int(tokens[3]) - 1 ] += count
            else:
                monitors[ int(tokens[3]) - 1 ] += count
