#include #define pb push_back #define sz(x) (int)(x).size() #define f first #define s second #define ll long long using namespace std; int main(){ int n; scanf("%i",&n); string a,b; cin >> a >> b; vector free[6]; vector> paths[6]; for(int i=0;i> ops; bool carry=0; for(auto p:paths[2]){ reverse(p.begin(),p.end()); for(auto d:p){ ops.pb({0,d+1}); if(carry){ ops.pb({1,0}); } if(b[d]=='-'){ carry=0; } else{ carry=1; ops.pb({2,0}); } } } for(auto p:paths[3]){ reverse(p.begin(),p.end()); for(auto d:p){ ops.pb({0,d+1}); if(carry){ ops.pb({1,0}); } if(b[d]=='-'){ carry=0; } else{ carry=1; ops.pb({2,0}); } } } if(sz(ops)&&ops.back().f==2)ops.pop_back(); printf("%i\n",sz(ops)); for(auto p:ops){ if(p.f==0){ printf("DRIVE %i\n",p.s); } if(p.f==1)printf("DROPOFF\n"); if(p.f==2)printf("PICKUP\n"); } }