1725 {
1726 vector<string> vec[3];
1727 char line[1024];
1728 for(
int a = 0;
a < 3;
a++) {
1729 cin.getline(line, sizeof line);
1730 int i = 0;
1731 int j = 0;
1732 while(i < strlen(line) && j < strlen(line)) {
1733 while(line[i] != '[' && i < strlen(line)) {
1734 ++i;
1735 }
1736 while(line[j] != ']' && j < strlen(line)) {
1737 ++j;
1738 }
1739 if(i < strlen(line) && j < strlen(line)) {
1740 ostringstream oss;
1741 for(int m = i + 1; m < j; ++m) {
1742 oss << line[m];
1743 }
1744 vec[a].push_back(oss.str());
1745 ++i;
1746 ++j;
1747 }
1748 }
1749 }
1750 int k;
1751 cin >> k;
1752 while(k-- != 0) {
1753 ostringstream oss;
1754 int a;
1755 int b;
1756 int c;
1757 int d;
1758 int e;
1759 cin >> a >> b >> c >> d >> e;
1760 --a;
1761 --b;
1762 --c;
1763 --d;
1764 --e;
1765 if(a < vec[0].size()) {
1767 } else {
1768 goto END;
1769 }
1770 oss << '(';
1771 if(b < vec[1].size()) {
1773 } else {
1774 goto END;
1775 }
1776 if(c < vec[2].size()) {
1778 } else {
1779 goto END;
1780 }
1781 if(d < vec[1].size()) {
1783 } else {
1784 goto END;
1785 }
1786 oss << ')';
1787 if(e < vec[0].size()) {
1789 } else {
1790 goto END;
1791 }
1792 cout << oss.str() << endl;
1793 continue;
1794 END:;
1795 cout << "Are you kidding me? @\\/@" << endl;
1796 }
1797 return 0;
1798 }