func_code_string: #include <bits/stdc++.h>   using namespace std;   const int N = 3e5 + 5;   char s[N];   int main(void) {     int n;     while (cin >> n) {       int cntl = 0;       int cntr = 0;       int cntq = 0;       getchar();       n = abs(n);       scanf( %s , s);       if (s[0] ==  )  || s[n - 1] ==  ( ) {         puts( :( );         continue;       }       if (n == 0) {         puts( :( );         continue;       }       if (n & 1) {         puts( :( );         continue;       }       for (int i = 0; i < n; i++) {         if (s[i] ==  ) )           cntr++;         else if (s[i] ==  ( )           cntl++;         else           cntq++;       }       if (abs(cntl - cntr) > cntq) {         puts( :( );         continue;       }       int needl = n / 2 - cntl;       for (int i = 0; i < n; i++) {         if (needl) {           if (s[i] ==  ? ) {             s[i] =  ( ;             needl--;           }         } else {           if (s[i] ==  ? ) s[i] =  ) ;         }       }       bool flg = false;       cntl = 0;       cntr = 0;       for (int i = 0; i < n; i++) {         if (s[i] ==  ) )           cntr++;         else           cntl++;         if ((i + 1) % 2 == 0) {           if (cntr == cntl && i + 1 != n) {             flg = true;             break;           }         }       }       if (flg == false) {         printf( %s n , s);       } else         puts( :( );     }     return 0;   }   