#include using namespace std; int get(string s) { if(s == "E") return 0; if(s == "NE") return 45; if(s == "N") return 90; if(s == "NW") return 135; if(s == "W") return 180; if(s == "SW") return 225; if(s == "S") return 270; if(s == "SE") return 315; } int main() { string have, want; cin >> have >> want; int a = get(have); int b = get(want); if(b < a) b += 360; if(a == b) return void(cout << "Keep going straight\n"), 0; if(a + 180 == b) return void(cout << "U-turn\n"), 0; if(a + 180 > b) return void(cout << "Turn " << (b-a) << " degrees port\n"), 0; return void(cout << "Turn " << (a+360-b) << " degrees starboard\n"), 0; }