#include using namespace std; int main() { int n; cin >> n; vector S(n); vector T(n); for (int i = 0; i < n; i++) cin >> S[i]; for (int i = 0; i < n; i++) cin >> T[i]; for (int i = 1; i <= n; i++) { if (S[i-1] != T[i-1]) { cout << i << "\n" << S[i-1] << "\n" << T[i-1] << "\n"; } } return 0; }