#include #include using namespace std; int main(){ int h,w;cin>>h>>w; char k;cin>>k; vector A(w); for(int i = 0; w > i; i++)cin>>A[i]; vector B(h); for(int i = 0; h > i; i++)cin>>B[i]; for(int i = 0; h > i; i++){ for(int j = 0; w > j; j++){ if(k == '+')cout << A[j] + B[i]; else cout << A[j]*B[i]; if(j+1 != w)cout << " "; } cout << endl; } }