import std.stdio, std.conv, std.string;
import std.array, std.range, std.algorithm, std.container;
import std.math, std.random, std.bigint, std.datetime, std.format;
string read(){ static string[] ss; while(!ss.length) ss = readln.chomp.split; string res = ss[0]; ss.popFront; return res; }

int DEBUG_LEVEL = 0;
void print()(){ writeln(""); }
void print(T, A ...)(T t, lazy A a){ write(t), print(a); }
void print(int level, T, A ...)(T t, lazy A a){ if(level <= DEBUG_LEVEL) print(t, a); }

const long mod = 1_000_000_007;

void main(string[] args){
	if(args.length > 1 && args[1] == "-debug"){
		if(args.length > 2 && args[2].isNumeric) DEBUG_LEVEL = args[2].to!int;
		else DEBUG_LEVEL = 1;
	}
	
	int n = read.to!int;
	char[] cs = readln.chomp.to!(char[]);
	
	
	if(n % 2 > 0){ // this matters only for n = 1
		writeln(":(");
		return;
	}
	
	if(cs[0] == ')' || cs[$ - 1] == '('){
		writeln(":(");
		return;
	}
	
	auto cntleft = cs.count!(x => x == '(');
	auto cntright = cs.count!(x => x == ')');
	if( cntleft > n / 2 || cntright > n / 2){
		writeln(":(");
		return;
	}
	
	auto lackleft = n / 2 - cntleft;
	auto lackright = n / 2 - cntright;
	foreach(i; 0 .. n){
		if(cs[i] == '?') lackleft -= 1, cs[i] = '(';
		if(lackleft == 0) break;
	}
	foreach_reverse(i; 0 .. n){
		if(cs[i] == '?') lackright -= 1, cs[i] = ')';
		if(lackright == 0) break;
	}
	
	int depth = 0;
	foreach(i; 0 .. n){
		if(cs[i] == '(') depth += 1;
		else depth -= 1;
		if(i < n - 1 && depth == 0){
			writeln(":(");
			return;
		}
	}
	
	cs.to!string.writeln;
}

/*

- Fail if n is odd
- Fail if the leftmost is )
- Fail if the rightmost is (
- Fail if there are too many (s
- Fail if there are too many )s
~ Otherwise, try this:
  - Fill with ( from the left end until (s are enough
  - Fill with ) from the right end until )s are enough
- If the result is valid, it is valid
- Otherwise, it is failure

*/
