#include <iostream>    

int* multiply(int* in1, int* in2, int size);

int main () {
    int n;
    while (std::cin >> n)
    {
        int* in1 = new int[n];
        int* in2 = new int[n];

        for (int i = 0; i < n; ++i)
            std::cin >> in1[i];
        
        for (int i = 0; i < n; ++i)
            std::cin >> in2[i];

        int* out = multiply(in1, in2, n);

        for (int i = 0; i < 2 * n; ++i)
        {
            if (i > 0)
                std::cout << " ";
            std::cout << out[i];
        }
        std::cout << std::endl;

        delete[] in1;
        delete[] in2;
        delete[] out;
    }
}
