#include <string>
#include <stack>
#include <vector>
#include <algorithm>
using namespace std;
vector<string> solution(int n, vector<int> arr1, vector<int> arr2) {
vector<string> answer;
for (int i = 0; i < n; ++i) {
int num = arr1[i] | arr2[i];
string row = "";
while (num > 0) {
if (num % 2) row += "#";
else row += " ";
num /= 2;
}
while (row.length() < n) {
row += " ";
}
reverse(row.begin(), row.end());
answer.push_back(row);
}
return answer;
}