문제 : [SWEA D3] 1228. [S/W 문제해결 기본] 8일차 - 암호문1
for t in range(1, 11):
N = int(input()) # 원본 암호문 길이
arr = list(input().split(" ")) # 원본 암호문
crypto = []
for i in range(N):
crypto.append(int(arr[i]))
n = int(input()) # 명령어 개수
command = list(input().split(" ")) # 명령어
i = 0
index = 0
num = 0
for j in range(n):
index = int(command[i + 1])
num = int(command[i + 2])
for k, c in enumerate(command[i + 3 : i + 3 + num]):
crypto.insert(index + k, int(c))
i = i + 3 + num
print(f"#{t}", end = " ")
for c in crypto[:10]:
print(c, end = " ")
print()