#include #include using namespace std; using namespace atcoder; #define emb emplace_back using ll = long long; int main(){ cin.tie(0);ios::sync_with_stdio(false); int N;cin >> N; vector S(N); for(string &s:S) cin >> s; int Q;cin >> Q; for(int i=0;i> t; if(t == 1){ int x;char c;cin >> x >> c;x--; S[x] += c; } else{ int x;cin >> x;x--; ll ans = 0; for(int i=0;i