func_code_string: #include <bits/stdc++.h>   using namespace std;   struct TreeNode {     int val;     TreeNode* left;     TreeNode* right;     TreeNode(int x) : val(x), left(NULL), right(NULL) {}   };   struct ListNode {     int val;     ListNode* next;     ListNode(int x) : val(x), next(NULL) {}   };   int nxt() {     int x;     cin >> x;     return x;   }   long long nxtLong() {     long long x;     cin >> x;     return x;   }   string nxtStr() {     string x;     cin >> x;     return x;   }   char nxtChar() {     char x;     cin >> x;     return x;   }   double nxtDouble() {     double x;     cin >> x;     return x;   }   long double nxtLDouble() {     long double x;     cin >> x;     return x;   }   TreeNode* makeTree(int n) {     queue<TreeNode*> tree_nodes;     TreeNode* root;     if (n) {       root = new TreeNode(nxt());       tree_nodes.push(root);     } else {       return NULL;     }     while (!tree_nodes.empty()) {       TreeNode* node = tree_nodes.front();       tree_nodes.pop();       bool left;       cin >> left;       if (left) {         node->left = new TreeNode(nxt());         tree_nodes.push(node->left);       }       bool right;       cin >> right;       if (right) {         node->right = new TreeNode(nxt());         tree_nodes.push(node->right);       }     }     return root;   }   ListNode* makeLinkedList(int n) {     ListNode* list = new ListNode(0);     ListNode* dummy = list;     for (int i = 0; i < n; ++i) {       list->next = new ListNode(nxt());       list = list->next;     }     return dummy->next;   }   char ans[2000001];   void solve() {     int n = nxt();     int len = 0;     while (n--) {       string s = nxtStr();       int m = nxt();       int l = s.length();       int y = 0;       while (m--) {         int x = nxt();         x--;         len = max(len, x + l);         for (int i = max(x, y); i < x + l; ++i) {           ans[i] = s[i - x];         }         y = x + l;       }     }     for (int i = 0; i < len; ++i) {       if (!ans[i]) {         cout <<  a ;       } else {         cout << ans[i];       }     }     cout << endl;   }   int main() {     ios::sync_with_stdio(0);     cin.tie(0);     cout << fixed << setprecision(9);     solve();     return 0;   }   