static int process(String line) {
		int cases = Integer.parseInt(line.trim());
		
		for(int i = 0; i < cases; i++) {
			char[] inst = readLine().trim().toCharArray();
			int size = 100;
			int[] mem = new int[size];
			int ind = 0;
			String out = "Case "+(i+1)+":";
			for(char c : inst) {
				switch (c) {
				case '>':
					ind++;
					break;
				case '<':
					ind--;
					break;
				case '+':
					mem[ind]++;
					break;
				case '-':
					mem[ind]--;
					break;
				case '.':
					//out += " "+getHexString(mem[ind]);
					break;
				default:
					break;
				}
				ind += size;
				ind %= size;
				mem[ind] += 256;
				mem[ind] %= 256;
			}
			for(int v : mem) {
				out += " "+getHexString(v);
			}
			System.out.println(out);
		}
		
		return 0;
	}