https://www.acmicpc.net/problem/10250
const fs=require('fs')
ip=fs.readFileSync(0).toString().split('\n')
t=parseInt(ip[0])
for(i=1;i<=t;i++){
v=ip[i].split(' ').map(Number)
h=parseInt(v[0])
w=parseInt(v[1])
n=parseInt(v[2])
if(n%h==0){
if(parseInt(n/h)<10) console.log(`${h}0${parseInt(n/h)}`)
else console.log(`${h}${parseInt(n/h)}`)
}
else{
if(parseInt(n/h)+1<10) console.log(`${n%h}0${parseInt(n/h)+1}`)
else console.log(`${n%h}${parseInt(n/h)+1}`)
}
}