#include using namespace std; int main() { int n,m; char op; cin >> n >> m >> op; vectora(n); vectorb(m); for(int i = 0;i < m;i++){ cin >> b[i]; } for(int i = 0;i < n;i++){ cin >> a[i]; for(int j = 0;j < m;j++){ if(op == '+'){ cout << a[i]+b[j] << " "; } if(op == '*'){ cout << a[i]*b[j] << " "; } } cout << "" << endl; } }