#include #include #include using namespace std; int main() { int m=-1,n=-1; while(1) { cin>>m>>n; if(m==0 && n==0) return 0; vector order; vector tracks[n]; vector result1, result2; int count=0; for(int i=0;i>temp; order.push_back(temp); } vector::iterator it=order.begin(); bool flag=true; vector r1,r2; for(int i=0;in) { cout<<"Transportation failed\n"<t && r1[j]==0) { r1[j]=count; r2[order[j] - 1]=count; t=order[j]; } } } } if(flag) //ouput { for(int i=0;i0) { if(tracks[j][s-1]