#include <fstream>
#include <iostream>
using namespace std;
ifstream f("matrice.txt");
int main(){
int n, a[100][100],i,j;
f >> n;
//Citire
for(i=1;i<=n;i++)
for (j=1;j<=n;j++)
f >> a[i][j];
//Afisare muchii
for(i=1;i<=n;i++)
for (j=1;j<=i;j++)
if(a[i][j]) cout << i << " - " << j << endl;
}