import java.io.*;
import java.util.*;

public class GeneratorHardTest {

	Scanner in;
	PrintWriter out;

   /*
   генератор тестов "выбираем ограниченный набор скобарей, которые будем вертеть туда-сюда"
   */

	void asserT(boolean e) {
		if (!e) {
			throw new Error();
		}
	}

	boolean isCorrect(char []s) {
		int d = 0;
		for (int i = 0; i < s.length; i++) {
			if (s[i] == '(') {
				d++;
			} else {
				asserT(s[i] == ')');
				d--;
				if (d < 0) {
					return false;
				}
			}
		}
		return d == 0;
	}

   /*
   генерим правильную скобочную последовательность заданной длины
   */

	void generateCorrect(char []s) {
		asserT(s.length % 2 == 0);
      int d = 0;
      for (int i = 0; i < s.length; i++) {
      	if (d == 0) {
      		s[i] = '(';
      		d++;
      	} else if (s.length - i - 1 < d) {
      	  s[i] = ')';
      	  d--;
      	} else {
      		int val = rand(2);
      		if (val == 0) {
      			d--;
      			s[i] = ')';
      		} else {
      			d++;
      			s[i] = '(';
      		}
      	}
      }
      asserT(d == 0);
	}

	void generateRandom(char []s) {
		asserT(s.length % 2 == 0);
		int d = 0;
		for (int i = 0; i < s.length; i++) {
			int remain = s.length - i;
			if (d == -remain) {
				s[i] = '(';
				d++;
			} else if (remain == d) {
      		s[i] = ')';
      		d--;
      	} else if (rand(2) == 0) {
				s[i] = '(';
				d++;
			} else {
				s[i] = ')';
				d--;
			}
		}
		asserT(d == 0);
	}

	int rand(int size) {
		return (int)(Math.random() * 100000000) % size;
	}
   

   static final int MAX_D = 6;

	void solve(){
		int len = in.nextInt();
		int nQueries = in.nextInt();
		int nRotated = in.nextInt();
   	
   	char []s1 = new char[len];
   	char []s2 = new char[len];
   	
   //	if (rand(2) == 0) {
   		generateCorrect(s1);
   //	} else {
  // 		generateCorrect(s2);
   //	}

   	int list[] = new int[nRotated];
      
      for (int i = 0; i < list.length; i++) {
      	list[i] = rand(len);
      }

   	out.println(s1);
   	out.println(nQueries);
   	int remain = nQueries / 3;
   	int d = 0;
   	
   	while (true) {
   		int pos = list[rand(list.length)];
   		if (-MAX_D < d && s1[pos] == '(') {
   			d -= 2;
   			s1[pos] = ')';
   			out.println(pos);
   			remain--;
   		} else if (d < MAX_D && s1[pos] == ')') {
   			d += 2;
   			s1[pos] = '(';
   			out.println(pos);
   			remain--;
   		}
   		if (d == 0 && rand(50) == 0 && isCorrect(s1)) {
   			for (int i = 0; i < list.length; i++) {
		      	list[i] = rand(len);
      		}
   		}
   		if (remain == 0) {
   			break;
   		}
   	}
   	
   	remain = nQueries - nQueries / 3;
   	generateCorrect(s2);
   	for (int i = 0; i < len; i++) {
   		if (s1[i] != s2[i]) {
   			s1[i] = s2[i];
   			if (remain == 0) {
   				return;
   			}
   			remain--;
   			out.println(i);
   		}
   	}

   	while (true) {
   		int pos = list[rand(list.length)];
   		if (-MAX_D < d && s1[pos] == '(') {
   			d -= 2;
   			s1[pos] = ')';
   			out.println(pos);
   			remain--;
   		} else if (d < MAX_D && s1[pos] == ')') {
   			d += 2;
   			s1[pos] = '(';
   			out.println(pos);
   			remain--;
   		}
   		if (d == 0 && rand(50) == 0 && isCorrect(s1)) {
   			for (int i = 0; i < list.length; i++) {
		      	list[i] = rand(len);
      		}
   		}
   		if (remain == 0) {
   			break;
   		}
   	}
   }

	void run(){
		try {
			in = new Scanner(System.in);
			out = new PrintWriter(new FileWriter("21.in"));
		} catch (IOException e) {
			throw new Error();
		}

		try {
			solve();
		} finally {
			out.close();
		}
	}

	public static void main(String []args) {
		new GeneratorHardTest().run();
	}
};