#pragma comment(linker, "/STACK:1024000000,1024000000") 
#include <iostream>
#include <cstdio>
#include <cstring>
#include <vector>
#include <algorithm>
#include <cmath>
#include <string>
#include <queue>

#define x first
#define y second
using namespace std;

typedef pair<int, int> PII;

int n, flag;

string rev(string str)
{
	for (int i = 0; i < n; i++) {
		if (str[i] == '?') continue;
		str[i] = ")("[str[i] - '('];
	}
	for (int i = 0; i < n / 2; i++) {
		swap(str[i], str[n - i - 1]);
	}
	return str;
}

vector<PII> gao(string str)
{
	vector<PII> res(n + 1, PII(0, 0));
	for (int i = 1; i <= n; i++) {
		if (str[i - 1] == '(') {
			res[i].x = res[i - 1].x + 1;
			res[i].y = res[i - 1].y + 1;
		}
		if (str[i - 1] == ')') {
			res[i].x = (res[i - 1].x == 0) ? 1 : res[i - 1].x - 1;
			res[i].y = res[i - 1].y - 1;
		}
		if (str[i - 1] == '?') {
			res[i].x = (res[i - 1].x == 0) ? 1 : res[i - 1].x - 1;
			res[i].y = res[i - 1].y + 1;
		}
		if (res[i].x > res[i].y) flag = 1;
	}
	return res;
}

int main()
{
	ios::sync_with_stdio(false);
	string str;
	while (cin >> str) {
		n = str.size();
		flag = 0;
		vector<PII> L = gao(str);
		vector<PII> R = gao(rev(str));
		reverse(R.begin(), R.end());
		for (int i = 1; i <= n; i++) {
			int c0 = max(L[i].x, R[i].x);
			int c1 = min(L[i].y, R[i].y);
			if (c0 > c1) flag |= 1;
			if (c0 < c1) flag |= 2;
		}
		if ((n & 1) || (flag & 1)) {
			puts("None");
			continue;
		}
		puts(flag ? "Many" : "Unique");
	}
	return 0;
}
