// Arup Guha
// 4/17/2016
// Solution to 2016 NAIPC Problem B: Alternative Bracket Notation

import java.util.*;

public class b {

	public static String s;
	public static int n;
	public static int[] match;
	public static int[] nD;

	public static void main(String[] args) {

		Scanner stdin = new Scanner(System.in);
		s = stdin.next();
		n = s.length();

		// Pre-calculate matching paren list.
		match = new int[n];
		Stack<Integer> myStack = new Stack<Integer>();
		for (int i=0; i<n; i++) {
			if (s.charAt(i) == '(')
				myStack.push(i);
			else {
				int open = myStack.pop();
				match[open] = i;
				match[i] = open;
			}
		}

		// Fill in number of digits.
		nD = new int[100000];
		nD[0]= 1;
		for (int start=1, d=1; start<100000; start*=10, d++)
			for (int i=start; i<10*start; i++)
				nD[i] = d;

		// Output result.
		System.out.println(solve(0, n-1, 0));
	}

	// solve the subproblem s[start..end], knowing that we've already
	// used loc characters previously.
	public static String solve(int start, int end, int loc) {

		// Base case - matching parens immediately.
		if (start+1 == end) {

			// There are two choices here, check which one works and return it.
			if (nD[loc+2+2*nD[loc]] == nD[loc]) {
				int val = loc+2+2*nD[loc];
				return val + "," + val + ":";
			}
			else {
				int val = loc + 2 + 2*(nD[loc]+1);
				return val + "," + val + ":";
			}
		}

		// First set of matching parens in range.
		int curS = start;
		int curE = match[curS];
		int curLoc = loc;

		// Matching parens are the whole range.
		if (curE == end) {

			// A low bound on where the description might start.
			int gStart = loc + 2 + nD[loc+2+nD[loc]] + nD[loc+(curE-curS-1)*(nD[loc]+1)];

			// Try solving with gStart until you find the right one.
			while (true) {
				String tmp = solve(curS+1, curE-1, gStart);

				// This has to match for it to be valid.
				int gEnd = gStart + tmp.length();
				if (loc+nD[gStart]+2+nD[gEnd] == gStart)
					return gStart + "," + gEnd +":" + tmp;

				// Well, let's just try the next one.
				gStart++;
			}
		}

		else {

			String res = "";

			// Loops through each separate matching () on outer layer in given range.
			while (true) {

				// Solve this section and add it.
				String tmp = solve(curS, curE, curLoc);
				curLoc += tmp.length();
				res = res + tmp;

				// Update bounds; cut out if we've finished.
				curS = curE+1;
				if (curS > end) break;
				curE = match[curS];
			}

			// This is all we want to return.
			return res;
		}
	}
}