본문 바로가기
Beakjoon&프로그래머스/파이썬

[백준/파이썬] 15814번 야바위 대장

by 현장 2023. 4. 27.

-Code

s = list(input())
for _ in range(int(input())):
    a, b = map(int, input().split())

    s[a], s[b] = s[b], s[a]
print(*s, sep='')