#include using namespace std; const int mx =1e3+5; long long a[mx]; long long b[mx]; long long gcd(long long x,long long y) { long long z=1; while (z) { z=x%y; x=y; y=z; } return x; } int main() { int t; cin>>t; while (t--) { int n; cin>>n; for (int i=0;i>a[i]; for (int i=0;i>b[i]; for (int i=n-1;i>=0;i--) { if (a[i]!=0 || b[i]!=0) { if (a[i]==0) { cout<<"0/1"<