#include
int main()
{
int i,j,a[3][5],t;
for(i=0;i<=2;i++)for(j=0;j<=4;j++)scanf("%d",&a[i][j]);
for(i=0;i<=2;i++)
{
t=a[i][0];
for(j=0;j<=4;j++)if(a[i][j]<=t)t=a[i][j];
printf("%d ",t);//最小值
for(j=0;j<=4;j++)if(a[i][j]==t)printf("[%d][%d] ",i,j);//下标
printf("\n");
}
return 0;
}