n=int(input())
for i in range(n):
h,w,c=map(int, input().split())
p=str(int((c-1)//h)+1)
q=str((c-1)%h+1)
if len(p)==1:
p='0'+p
print(q+p)
'백준(BOJ) 풀이' 카테고리의 다른 글
[백준 10828] 스택 (0) | 2019.11.14 |
---|---|
[백준 2775] 부녀회장이 될테야 (0) | 2019.11.14 |
[백준 1316] 그룹 단어 체커 (0) | 2019.11.14 |
[백준 2941] 크로아티아 알파벳 (0) | 2019.11.14 |
[백준 5622] 다이얼 (0) | 2019.11.14 |