 /*Header file starts here*/

//#include <bits/stdc++.h>
#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <bitset>
#include <algorithm>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cmath>
#include <iterator>
#include <cstdio>
#include <cstdlib>
#include <cctype>
#include <climits>
#include <string>
#include <sstream>
#include <cstring>
#include <ctime>

/*Header File ends here*/

/*Macro starts here*/

#define f(i,j,n) for(int i=j; i<n; i++)
#define fu(i,j,n) for(int i=j; i>n; i--)
#define c(x, n) x n; cin>>n
#define ft int t; scanf("%d", &t); for(int c=1; c<=t; c++)
#define w(n) while(n--)
#define visited 1
#define unvisited -1
#define debug printf("\n<<CameHere<<\n")
#define mem(x,y) memset(x, y, sizeof(x))
#define pal(temp) pali(temp, 0, temp.size()-1)
#define nl printf("\n")
#define space printf(" ");
#define eps 1e-9
#define inf 1<<28
#define cases printf("Case %d:", c);
#define all(v) (v).begin(), (v).end()
#define pb push_back
#define min3(a,b,c) min(min(a,b),c)
#define min4(a,b,c,d) min(min(a,b),min(c,d))
#define max3(a,b,c) max(max(a,b),c)
#define max4(a,b,c,d) max(max(a,b),max(c,d))
#define fin freopen("in.txt", "r", stdin)
#define fout freopen("out.txt", "w", stdout)
#define fast ios_base::sync_with_stdio(false); cin.tie(NULL)
#define gamma 0.57721566490153286060651209008240243
#define PI acos(-1)
#define pi 2*acos(0)
#define cos(a) cos(a*pi/180)
#define sin(a) sin(a*pi/180)
#define tan(a) tan(a*pi/180)
#define cosi(a) acos(a)/(pi/180)
#define sini(a) asin(a)/(pi/180)
#define tani(a) atan(a)/(pi/180)
#define tanii(a,b) atan2(a,b)/(pi/180)//tan(90) = Infinity or a/0
// log(a)=ln(a) base 2.718281828459044979,, log10(a) base 10;
#define powe(a) exp(a)//e^a
//Extended Geometry
#define dis(x1,y1,x2,y2) ((x1-x2)*(x1-x2))+((y1-y2)*(y1-y2))
#define t_area(a,b,c,s) sqrt(s*(s-a)*(s-b)*(s-c))
#define t_angle(a,b,c) cosi((b*b+c*c-a*a)/(2*b*c))

#define deb(x) cerr<< #x <<"="<<x<<endl;

#define si(a) int a; scanf("%d", &a);
#define sll(a) ll a; scanf("%lld", &a);
#define sllu(a) unsigned ll a; scanf("%llu", &a);
#define sd(a) double a; scanf("%lf", &a);

//#define p printf
/*Macro Ends here*/

using namespace std;

/*typedef start here*/

typedef string st;
typedef long long ll;
typedef vector <int> vi;
typedef vector <ll> vll;
typedef vector <string> vs;
typedef pair <int, int> ii;
typedef vector < pair <int, int> > vii;
typedef priority_queue<int,vector<int>,greater<int> > min_heap;

/*typedef ends here*/

/*Important functions starts here */

template <class T> T abs (T a, T b=0)
{
    if(b==0) return (a<0) ? -a : a;
    return (a>b) ? (a-b) : (b-a);
}

template <class T> inline T gcd(T a, T b)
{
    if(a<0) return gcd(-a, b);
    if(b<0) return gcd(a,-b);
    return (b==0) ? a : gcd(b, a%b);
}

ll xp(ll b, ll n, ll m) {
	ll r = 1;
	while(n > 0) {
		if(n & 1) {
			r = r * b;
			if(r >= m) r %= m;
		}
		n >>= 1;
		b = b * b;
		if(b >= m) b %= m;
	}
	return r % m;
}

ll inv(ll a, ll m){
    return xp(a, m-2, m);
}

bool pali(string temp, int i, int j)
{
    if(i>=j) return true;
    if(temp[i]==temp[j]) return pali(temp, i+1, j-1);
    return false;
}

/*Important functions ends here*/

/*Debug Extension starts here*/

template <typename F, typename S>
ostream& operator << (ostream& os, const pair< F, S>& p)
{
    return os<<"(" <<p.first<<", "<<p.second<<")";
}

template<typename T> ostream &operator << (ostream &os, const vector<T> &v)
{
    os<<"{";
    typename vector<T> :: const_iterator it;
    for(it= v.begin(); it!=v.end(); it++)
    {
        if(it!=v.begin()) os<<",";
        os<<*it;
    }
    return os<<"}";
}

template <typename T> ostream &operator << (ostream & os, const set<T>&v)
{
    os<<"[";
    typename set<T> :: const_iterator it;
    for(it=v.begin(); it!=v.end(); it++)
    {
        if(it!=v.begin()) os<<",";
        os<<*it;
    }
    return os<<"]";
}

template <typename F, typename S> ostream &operator << (ostream & os, const map<F,S>&v)
{
    os<<"[";
    typename map<F,S>::const_iterator it;

    for(it=v.begin(); it!=v.end(); it++)
    {
        if(it != v.begin()) os<<",";
        os<< it ->first<<"="<<it->second;
    }
    return os<<"]";
}

/*Debug Extension ends here*/

ll fact[100002];
ll m=1000000007;
int coun=0;

ll ncr(int n, int r) {
	ll niche=(fact[r]*fact[n-r])%m;
	niche=inv(niche, m);
	ll ans=(fact[n]*niche)%m;
	return ans;
}

void call(char ch){
	int n;
	if(ch>='0' and ch<='0') n=ch-'0';
	else if(ch>='A' and ch<='Z') n=ch-'A'+10;
	else if(ch>='a' and ch<='z') n=ch-'a'+36;
	else if(ch=='-') n=62;
	else n=63;
	int innercoun=6;
	while(n) {
		innercoun--;
		coun+=(n%2==0);
		n/=2;
	}
	coun+=innercoun;
}

int main(){
	fact[0]=fact[1]=1;
	f(i,2,100001) fact[i]=(fact[i-1]*(ll)i)%m;
	c(st, str);
	int sz=str.size();
	f(i,0,sz) call(str[i]);
	ll ans=0;
	f(i,0,coun+1) {
		ll temp=ncr(coun, i);
		temp*=xp(2, i, m);
		temp%=m;
		ans+=temp;
		ans%=m;
	}
	cout<<ans<<endl;
return 0;
}


 /*Header file starts here*/

//#include <bits/stdc++.h>
#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <bitset>
#include <algorithm>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cmath>
#include <iterator>
#include <cstdio>
#include <cstdlib>
#include <cctype>
#include <climits>
#include <string>
#include <sstream>
#include <cstring>
#include <ctime>

/*Header File ends here*/

/*Macro starts here*/

#define f(i,j,n) for(int i=j; i<n; i++)
#define fu(i,j,n) for(int i=j; i>n; i--)
#define c(x, n) x n; cin>>n
#define ft int t; scanf("%d", &t); for(int c=1; c<=t; c++)
#define w(n) while(n--)
#define visited 1
#define unvisited -1
#define debug printf("\n<<CameHere<<\n")
#define mem(x,y) memset(x, y, sizeof(x))
#define pal(temp) pali(temp, 0, temp.size()-1)
#define nl printf("\n")
#define space printf(" ");
#define eps 1e-9
#define inf 1<<28
#define cases printf("Case %d:", c);
#define all(v) (v).begin(), (v).end()
#define pb push_back
#define min3(a,b,c) min(min(a,b),c)
#define min4(a,b,c,d) min(min(a,b),min(c,d))
#define max3(a,b,c) max(max(a,b),c)
#define max4(a,b,c,d) max(max(a,b),max(c,d))
#define fin freopen("in.txt", "r", stdin)
#define fout freopen("out.txt", "w", stdout)
#define fast ios_base::sync_with_stdio(false); cin.tie(NULL)
#define gamma 0.57721566490153286060651209008240243
#define PI acos(-1)
#define pi 2*acos(0)
#define cos(a) cos(a*pi/180)
#define sin(a) sin(a*pi/180)
#define tan(a) tan(a*pi/180)
#define cosi(a) acos(a)/(pi/180)
#define sini(a) asin(a)/(pi/180)
#define tani(a) atan(a)/(pi/180)
#define tanii(a,b) atan2(a,b)/(pi/180)//tan(90) = Infinity or a/0
// log(a)=ln(a) base 2.718281828459044979,, log10(a) base 10;
#define powe(a) exp(a)//e^a
//Extended Geometry
#define dis(x1,y1,x2,y2) ((x1-x2)*(x1-x2))+((y1-y2)*(y1-y2))
#define t_area(a,b,c,s) sqrt(s*(s-a)*(s-b)*(s-c))
#define t_angle(a,b,c) cosi((b*b+c*c-a*a)/(2*b*c))

#define deb(x) cerr<< #x <<"="<<x<<endl;

#define si(a) int a; scanf("%d", &a);
#define sll(a) ll a; scanf("%lld", &a);
#define sllu(a) unsigned ll a; scanf("%llu", &a);
#define sd(a) double a; scanf("%lf", &a);

//#define p printf
/*Macro Ends here*/

using namespace std;

/*typedef start here*/

typedef string st;
typedef unsigned long long ll;
typedef vector <int> vi;
typedef vector <ll> vll;
typedef vector <string> vs;
typedef pair <int, int> ii;
typedef vector < pair <int, int> > vii;
typedef priority_queue<int,vector<int>,greater<int> > min_heap;

/*typedef ends here*/

/*Important functions starts here */

template <class T> T abs (T a, T b=0)
{
    if(b==0) return (a<0) ? -a : a;
    return (a>b) ? (a-b) : (b-a);
}

template <class T> inline T gcd(T a, T b)
{
    if(a<0) return gcd(-a, b);
    if(b<0) return gcd(a,-b);
    return (b==0) ? a : gcd(b, a%b);
}

ll xp(ll b, ll n, ll m) {
	ll r = 1;
	while(n > 0) {
		if(n & 1) {
			r = r * b;
			if(r >= m) r %= m;
		}
		n >>= 1;
		b = b * b;
		if(b >= m) b %= m;
	}
	return r % m;
}

ll inv(ll a, ll m){
    return xp(a, m-2, m);
}

bool pali(string temp, int i, int j)
{
    if(i>=j) return true;
    if(temp[i]==temp[j]) return pali(temp, i+1, j-1);
    return false;
}

/*Important functions ends here*/

/*Debug Extension starts here*/

template <typename F, typename S>
ostream& operator << (ostream& os, const pair< F, S>& p)
{
    return os<<"(" <<p.first<<", "<<p.second<<")";
}

template<typename T> ostream &operator << (ostream &os, const vector<T> &v)
{
    os<<"{";
    typename vector<T> :: const_iterator it;
    for(it= v.begin(); it!=v.end(); it++)
    {
        if(it!=v.begin()) os<<",";
        os<<*it;
    }
    return os<<"}";
}

template <typename T> ostream &operator << (ostream & os, const set<T>&v)
{
    os<<"[";
    typename set<T> :: const_iterator it;
    for(it=v.begin(); it!=v.end(); it++)
    {
        if(it!=v.begin()) os<<",";
        os<<*it;
    }
    return os<<"]";
}

template <typename F, typename S> ostream &operator << (ostream & os, const map<F,S>&v)
{
    os<<"[";
    typename map<F,S>::const_iterator it;

    for(it=v.begin(); it!=v.end(); it++)
    {
        if(it != v.begin()) os<<",";
        os<< it ->first<<"="<<it->second;
    }
    return os<<"]";
}

/*Debug Extension ends here*/

ll fact[100002];
ll m=1000000007;
int coun=0;

ll ncr(int n, int r) {
	ll niche=(fact[r]*fact[n-r])%m;
	niche=inv(niche, m);
	ll ans=(fact[n]*niche)%m;
	return ans;
}

void call(char ch){
	int n;
	if(ch>='0' and ch<='9') n=ch-'0';
	else if(ch>='A' and ch<='Z') n=ch-'A'+10;
	else if(ch>='a' and ch<='z') n=ch-'a'+36;
	else if(ch=='-') n=62;
	else n=63;
	//cout<<n<<endl;
	int innercoun=6;
	while(n) {
		innercoun--;
		coun+=(n%2==0);
		n/=2;
	}
	coun+=innercoun;
}

st check="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_";

int main(){
	/*f(i,0,64) {
		cout<<i<<" : "<<check[i]<<" ";
		call(check[i]);
	}*/
	fact[0]=fact[1]=1;
	f(i,2,100001) fact[i]=(fact[i-1]*(ll)i)%m;
	//f(i,0,1000) cout<<i<<" : "<<fact[i]<<endl;
	c(st, str);
	int sz=str.size();
	f(i,0,sz) call(str[i]);
	ll ans=0;
	f(i,0,coun+1) {
		ll temp=ncr(coun, i);
		temp*=xp(2, i, m);
		temp%=m;
		ans+=temp;
		ans%=m;
	}
	cout<<ans<<endl;
return 0;
}


 /*Header file starts here*/

//#include <bits/stdc++.h>
#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <bitset>
#include <algorithm>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cmath>
#include <iterator>
#include <cstdio>
#include <cstdlib>
#include <cctype>
#include <climits>
#include <string>
#include <sstream>
#include <cstring>
#include <ctime>

/*Header File ends here*/

/*Macro starts here*/

#define f(i,j,n) for(int i=j; i<n; i++)
#define fu(i,j,n) for(int i=j; i>n; i--)
#define c(x, n) x n; cin>>n
#define ft int t; scanf("%d", &t); for(int c=1; c<=t; c++)
#define w(n) while(n--)
#define visited 1
#define unvisited -1
#define debug printf("\n<<CameHere<<\n")
#define mem(x,y) memset(x, y, sizeof(x))
#define pal(temp) pali(temp, 0, temp.size()-1)
#define nl printf("\n")
#define space printf(" ");
#define eps 1e-9
#define inf 1<<28
#define cases printf("Case %d:", c);
#define all(v) (v).begin(), (v).end()
#define pb push_back
#define min3(a,b,c) min(min(a,b),c)
#define min4(a,b,c,d) min(min(a,b),min(c,d))
#define max3(a,b,c) max(max(a,b),c)
#define max4(a,b,c,d) max(max(a,b),max(c,d))
#define fin freopen("in.txt", "r", stdin)
#define fout freopen("out.txt", "w", stdout)
#define fast ios_base::sync_with_stdio(false); cin.tie(NULL)
#define gamma 0.57721566490153286060651209008240243
#define PI acos(-1)
#define pi 2*acos(0)
#define cos(a) cos(a*pi/180)
#define sin(a) sin(a*pi/180)
#define tan(a) tan(a*pi/180)
#define cosi(a) acos(a)/(pi/180)
#define sini(a) asin(a)/(pi/180)
#define tani(a) atan(a)/(pi/180)
#define tanii(a,b) atan2(a,b)/(pi/180)//tan(90) = Infinity or a/0
// log(a)=ln(a) base 2.718281828459044979,, log10(a) base 10;
#define powe(a) exp(a)//e^a
//Extended Geometry
#define dis(x1,y1,x2,y2) ((x1-x2)*(x1-x2))+((y1-y2)*(y1-y2))
#define t_area(a,b,c,s) sqrt(s*(s-a)*(s-b)*(s-c))
#define t_angle(a,b,c) cosi((b*b+c*c-a*a)/(2*b*c))

#define deb(x) cerr<< #x <<"="<<x<<endl;

#define si(a) int a; scanf("%d", &a);
#define sll(a) ll a; scanf("%lld", &a);
#define sllu(a) unsigned ll a; scanf("%llu", &a);
#define sd(a) double a; scanf("%lf", &a);

//#define p printf
/*Macro Ends here*/

using namespace std;

/*typedef start here*/

typedef string st;
typedef long long ll;
typedef vector <int> vi;
typedef vector <ll> vll;
typedef vector <string> vs;
typedef pair <int, int> ii;
typedef vector < pair <int, int> > vii;
typedef priority_queue<int,vector<int>,greater<int> > min_heap;

/*typedef ends here*/

/*Important functions starts here */

template <class T> T abs (T a, T b=0)
{
    if(b==0) return (a<0) ? -a : a;
    return (a>b) ? (a-b) : (b-a);
}

template <class T> inline T gcd(T a, T b)
{
    if(a<0) return gcd(-a, b);
    if(b<0) return gcd(a,-b);
    return (b==0) ? a : gcd(b, a%b);
}

ll xp(ll b, ll n, ll m) {
	ll r = 1;
	while(n > 0) {
		if(n & 1) {
			r = r * b;
			if(r >= m) r %= m;
		}
		n >>= 1;
		b = b * b;
		if(b >= m) b %= m;
	}
	return r % m;
}

ll inv(ll a, ll m){
    return xp(a, m-2, m);
}

bool pali(string temp, int i, int j)
{
    if(i>=j) return true;
    if(temp[i]==temp[j]) return pali(temp, i+1, j-1);
    return false;
}

/*Important functions ends here*/

/*Debug Extension starts here*/

template <typename F, typename S>
ostream& operator << (ostream& os, const pair< F, S>& p)
{
    return os<<"(" <<p.first<<", "<<p.second<<")";
}

template<typename T> ostream &operator << (ostream &os, const vector<T> &v)
{
    os<<"{";
    typename vector<T> :: const_iterator it;
    for(it= v.begin(); it!=v.end(); it++)
    {
        if(it!=v.begin()) os<<",";
        os<<*it;
    }
    return os<<"}";
}

template <typename T> ostream &operator << (ostream & os, const set<T>&v)
{
    os<<"[";
    typename set<T> :: const_iterator it;
    for(it=v.begin(); it!=v.end(); it++)
    {
        if(it!=v.begin()) os<<",";
        os<<*it;
    }
    return os<<"]";
}

template <typename F, typename S> ostream &operator << (ostream & os, const map<F,S>&v)
{
    os<<"[";
    typename map<F,S>::const_iterator it;

    for(it=v.begin(); it!=v.end(); it++)
    {
        if(it != v.begin()) os<<",";
        os<< it ->first<<"="<<it->second;
    }
    return os<<"]";
}

/*Debug Extension ends here*/

ll fact[100002];
ll m=1000000007;
int coun=0;

ll ncr(int n, int r) {
	ll niche=(fact[r]*fact[n-r])%m;
	niche=inv(niche, m);
	ll ans=(fact[n]*niche)%m;
	return ans;
}

void call(char ch){
	int n;
	if(ch>='0' and ch<='9') n=ch-'0';
	else if(ch>='A' and ch<='Z') n=ch-'A'+10;
	else if(ch>='a' and ch<='z') n=ch-'a'+36;
	else if(ch=='-') n=62;
	else n=63;
	int innercoun=6;
	while(n) {
		innercoun--;
		coun+=(n%2==0);
		n/=2;
	}
	coun+=innercoun;
}

//st check="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_";

int main(){
	fact[0]=fact[1]=1;
	f(i,2,100001) fact[i]=(fact[i-1]*(ll)i)%m;
	c(st, str);
	int sz=str.size();
	ll ans=0;
	f(i,0,coun+1) {
		ll temp=ncr(coun, i);
		temp*=xp(2, i, m);
		temp%=m;
		ans+=temp;
		ans%=m;
	}
	cout<<ans<<endl;
return 0;
}


 /*Header file starts here*/

//#include <bits/stdc++.h>
#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <bitset>
#include <algorithm>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cmath>
#include <iterator>
#include <cstdio>
#include <cstdlib>
#include <cctype>
#include <climits>
#include <string>
#include <sstream>
#include <cstring>
#include <ctime>

/*Header File ends here*/

/*Macro starts here*/

#define f(i,j,n) for(int i=j; i<n; i++)
#define fu(i,j,n) for(int i=j; i>n; i--)
#define c(x, n) x n; cin>>n
#define ft int t; scanf("%d", &t); for(int c=1; c<=t; c++)
#define w(n) while(n--)
#define visited 1
#define unvisited -1
#define debug printf("\n<<CameHere<<\n")
#define mem(x,y) memset(x, y, sizeof(x))
#define pal(temp) pali(temp, 0, temp.size()-1)
#define nl printf("\n")
#define space printf(" ");
#define eps 1e-9
#define inf 1<<28
#define cases printf("Case %d:", c);
#define all(v) (v).begin(), (v).end()
#define pb push_back
#define min3(a,b,c) min(min(a,b),c)
#define min4(a,b,c,d) min(min(a,b),min(c,d))
#define max3(a,b,c) max(max(a,b),c)
#define max4(a,b,c,d) max(max(a,b),max(c,d))
#define fin freopen("in.txt", "r", stdin)
#define fout freopen("out.txt", "w", stdout)
#define fast ios_base::sync_with_stdio(false); cin.tie(NULL)
#define gamma 0.57721566490153286060651209008240243
#define PI acos(-1)
#define pi 2*acos(0)
#define cos(a) cos(a*pi/180)
#define sin(a) sin(a*pi/180)
#define tan(a) tan(a*pi/180)
#define cosi(a) acos(a)/(pi/180)
#define sini(a) asin(a)/(pi/180)
#define tani(a) atan(a)/(pi/180)
#define tanii(a,b) atan2(a,b)/(pi/180)//tan(90) = Infinity or a/0
// log(a)=ln(a) base 2.718281828459044979,, log10(a) base 10;
#define powe(a) exp(a)//e^a
//Extended Geometry
#define dis(x1,y1,x2,y2) ((x1-x2)*(x1-x2))+((y1-y2)*(y1-y2))
#define t_area(a,b,c,s) sqrt(s*(s-a)*(s-b)*(s-c))
#define t_angle(a,b,c) cosi((b*b+c*c-a*a)/(2*b*c))

#define deb(x) cerr<< #x <<"="<<x<<endl;

#define si(a) int a; scanf("%d", &a);
#define sll(a) ll a; scanf("%lld", &a);
#define sllu(a) unsigned ll a; scanf("%llu", &a);
#define sd(a) double a; scanf("%lf", &a);

//#define p printf
/*Macro Ends here*/

using namespace std;

/*typedef start here*/

typedef string st;
typedef long long ll;
typedef vector <int> vi;
typedef vector <ll> vll;
typedef vector <string> vs;
typedef pair <int, int> ii;
typedef vector < pair <int, int> > vii;
typedef priority_queue<int,vector<int>,greater<int> > min_heap;

/*typedef ends here*/

/*Important functions starts here */

template <class T> T abs (T a, T b=0)
{
    if(b==0) return (a<0) ? -a : a;
    return (a>b) ? (a-b) : (b-a);
}

template <class T> inline T gcd(T a, T b)
{
    if(a<0) return gcd(-a, b);
    if(b<0) return gcd(a,-b);
    return (b==0) ? a : gcd(b, a%b);
}

ll xp(ll b, ll n, ll m) {
	ll r = 1;
	while(n > 0) {
		if(n & 1) {
			r = r * b;
			if(r >= m) r %= m;
		}
		n >>= 1;
		b = b * b;
		if(b >= m) b %= m;
	}
	return r % m;
}

ll inv(ll a, ll m){
    return xp(a, m-2, m);
}

bool pali(string temp, int i, int j)
{
    if(i>=j) return true;
    if(temp[i]==temp[j]) return pali(temp, i+1, j-1);
    return false;
}

/*Important functions ends here*/

/*Debug Extension starts here*/

template <typename F, typename S>
ostream& operator << (ostream& os, const pair< F, S>& p)
{
    return os<<"(" <<p.first<<", "<<p.second<<")";
}

template<typename T> ostream &operator << (ostream &os, const vector<T> &v)
{
    os<<"{";
    typename vector<T> :: const_iterator it;
    for(it= v.begin(); it!=v.end(); it++)
    {
        if(it!=v.begin()) os<<",";
        os<<*it;
    }
    return os<<"}";
}

template <typename T> ostream &operator << (ostream & os, const set<T>&v)
{
    os<<"[";
    typename set<T> :: const_iterator it;
    for(it=v.begin(); it!=v.end(); it++)
    {
        if(it!=v.begin()) os<<",";
        os<<*it;
    }
    return os<<"]";
}

template <typename F, typename S> ostream &operator << (ostream & os, const map<F,S>&v)
{
    os<<"[";
    typename map<F,S>::const_iterator it;

    for(it=v.begin(); it!=v.end(); it++)
    {
        if(it != v.begin()) os<<",";
        os<< it ->first<<"="<<it->second;
    }
    return os<<"]";
}

/*Debug Extension ends here*/

ll fact[100002];
ll m=1000000007;
int coun=0;

ll ncr(int n, int r) {
	ll niche=(fact[r]*fact[n-r])%m;
	niche=inv(niche, m);
	ll ans=(fact[n]*niche)%m;
	return ans;
}

void call(char ch){
	int n;
	if(ch>='0' and ch<='9') n=ch-'0';
	else if(ch>='A' and ch<='Z') n=ch-'A'+10;
	else if(ch>='a' and ch<='z') n=ch-'a'+36;
	else if(ch=='-') n=62;
	else n=63;
	int innercoun=6;
	while(n) {
		innercoun--;
		coun+=(n%2==0);
		n/=2;
	}
	coun+=innercoun;
}

//st check="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_";

int main(){

	fact[0]=fact[1]=1;
	f(i,2,100001) fact[i]=(fact[i-1]*(ll)i)%m;
	c(st, str);
	int sz=str.size();
	f(i,0,sz) call(str[i]);
	ll ans=0;
	f(i,0,coun+1) {
		ll temp=ncr(coun, i);
		temp*=xp(2, i, m);
		temp%=m;
		ans+=temp;
		ans%=m;
	}
	cout<<ans<<endl;
return 0;
}


 /*Header file starts here*/

//#include <bits/stdc++.h>
#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <bitset>
#include <algorithm>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cmath>
#include <iterator>
#include <cstdio>
#include <cstdlib>
#include <cctype>
#include <climits>
#include <string>
#include <sstream>
#include <cstring>
#include <ctime>

/*Header File ends here*/

/*Macro starts here*/

#define f(i,j,n) for(int i=j; i<n; i++)
#define fu(i,j,n) for(int i=j; i>n; i--)
#define c(x, n) x n; cin>>n
#define ft int t; scanf("%d", &t); for(int c=1; c<=t; c++)
#define w(n) while(n--)
#define visited 1
#define unvisited -1
#define debug printf("\n<<CameHere<<\n")
#define mem(x,y) memset(x, y, sizeof(x))
#define pal(temp) pali(temp, 0, temp.size()-1)
#define nl printf("\n")
#define space printf(" ");
#define eps 1e-9
#define inf 1<<28
#define cases printf("Case %d:", c);
#define all(v) (v).begin(), (v).end()
#define pb push_back
#define min3(a,b,c) min(min(a,b),c)
#define min4(a,b,c,d) min(min(a,b),min(c,d))
#define max3(a,b,c) max(max(a,b),c)
#define max4(a,b,c,d) max(max(a,b),max(c,d))
#define fin freopen("in.txt", "r", stdin)
#define fout freopen("out.txt", "w", stdout)
#define fast ios_base::sync_with_stdio(false); cin.tie(NULL)
#define gamma 0.57721566490153286060651209008240243
#define PI acos(-1)
#define pi 2*acos(0)
#define cos(a) cos(a*pi/180)
#define sin(a) sin(a*pi/180)
#define tan(a) tan(a*pi/180)
#define cosi(a) acos(a)/(pi/180)
#define sini(a) asin(a)/(pi/180)
#define tani(a) atan(a)/(pi/180)
#define tanii(a,b) atan2(a,b)/(pi/180)//tan(90) = Infinity or a/0
// log(a)=ln(a) base 2.718281828459044979,, log10(a) base 10;
#define powe(a) exp(a)//e^a
//Extended Geometry
#define dis(x1,y1,x2,y2) ((x1-x2)*(x1-x2))+((y1-y2)*(y1-y2))
#define t_area(a,b,c,s) sqrt(s*(s-a)*(s-b)*(s-c))
#define t_angle(a,b,c) cosi((b*b+c*c-a*a)/(2*b*c))

#define deb(x) cerr<< #x <<"="<<x<<endl;

#define si(a) int a; scanf("%d", &a);
#define sll(a) ll a; scanf("%lld", &a);
#define sllu(a) unsigned ll a; scanf("%llu", &a);
#define sd(a) double a; scanf("%lf", &a);

//#define p printf
/*Macro Ends here*/

using namespace std;

/*typedef start here*/

typedef string st;
typedef unsigned long long ll;
typedef vector <int> vi;
typedef vector <ll> vll;
typedef vector <string> vs;
typedef pair <int, int> ii;
typedef vector < pair <int, int> > vii;
typedef priority_queue<int,vector<int>,greater<int> > min_heap;

/*typedef ends here*/

/*Important functions starts here */

template <class T> T abs (T a, T b=0)
{
    if(b==0) return (a<0) ? -a : a;
    return (a>b) ? (a-b) : (b-a);
}

template <class T> inline T gcd(T a, T b)
{
    if(a<0) return gcd(-a, b);
    if(b<0) return gcd(a,-b);
    return (b==0) ? a : gcd(b, a%b);
}

ll xp(ll b, ll n, ll m) {
	ll r = 1;
	while(n > 0) {
		if(n & 1) {
			r = r * b;
			if(r >= m) r %= m;
		}
		n >>= 1;
		b = b * b;
		if(b >= m) b %= m;
	}
	return r % m;
}

ll inv(ll a, ll m){
    return xp(a, m-2, m);
}

bool pali(string temp, int i, int j)
{
    if(i>=j) return true;
    if(temp[i]==temp[j]) return pali(temp, i+1, j-1);
    return false;
}

/*Important functions ends here*/

/*Debug Extension starts here*/

template <typename F, typename S>
ostream& operator << (ostream& os, const pair< F, S>& p)
{
    return os<<"(" <<p.first<<", "<<p.second<<")";
}

template<typename T> ostream &operator << (ostream &os, const vector<T> &v)
{
    os<<"{";
    typename vector<T> :: const_iterator it;
    for(it= v.begin(); it!=v.end(); it++)
    {
        if(it!=v.begin()) os<<",";
        os<<*it;
    }
    return os<<"}";
}

template <typename T> ostream &operator << (ostream & os, const set<T>&v)
{
    os<<"[";
    typename set<T> :: const_iterator it;
    for(it=v.begin(); it!=v.end(); it++)
    {
        if(it!=v.begin()) os<<",";
        os<<*it;
    }
    return os<<"]";
}

template <typename F, typename S> ostream &operator << (ostream & os, const map<F,S>&v)
{
    os<<"[";
    typename map<F,S>::const_iterator it;

    for(it=v.begin(); it!=v.end(); it++)
    {
        if(it != v.begin()) os<<",";
        os<< it ->first<<"="<<it->second;
    }
    return os<<"]";
}

/*Debug Extension ends here*/

ll fact[100002];
ll m=1000000007;
int coun=0;

ll ncr(int n, int r) {
	ll niche=(fact[r]*fact[n-r])%m;
	niche=inv(niche, m);
	ll ans=(fact[n]*niche)%m;
	return ans;
}

void call(char ch){
	int n;
	if(ch>='0' and ch<='9') n=ch-'0';
	else if(ch>='A' and ch<='Z') n=ch-'A'+10;
	else if(ch>='a' and ch<='z') n=ch-'a'+36;
	else if(ch=='-') n=62;
	else n=63;
	//cout<<n<<endl;
	int innercoun=6;
	while(n) {
		innercoun--;
		coun+=(n%2==0);
		n/=2;
	}
	coun+=innercoun;
}

st check="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_";

int main(){
	/*f(i,0,64) {
		cout<<i<<" : "<<check[i]<<" ";
		call(check[i]);
	}*/
	fact[0]=fact[1]=1;
	f(i,2,100001) fact[i]=(fact[i-1]*(ll)i)%m;
	//f(i,0,1000) cout<<i<<" : "<<fact[i]<<endl;
	c(st, str);
	int sz=str.size();
	f(i,0,sz) call(str[i]);
	ll ans=0;
	f(i,0,coun+1) {
		ll temp=ncr(coun, i);
		while(temp<0) temp+=m;
		temp*=xp(2, i, m);
		while(temp<0) temp+=m;
		temp%=m;
		ans+=temp;
		while(ans<0) temp+=m;
		ans%=m;
	}
	cout<<ans<<endl;
return 0;
}


 /*Header file starts here*/

//#include <bits/stdc++.h>
#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <bitset>
#include <algorithm>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cmath>
#include <iterator>
#include <cstdio>
#include <cstdlib>
#include <cctype>
#include <climits>
#include <string>
#include <sstream>
#include <cstring>
#include <ctime>

/*Header File ends here*/

/*Macro starts here*/

#define f(i,j,n) for(int i=j; i<n; i++)
#define fu(i,j,n) for(int i=j; i>n; i--)
#define c(x, n) x n; cin>>n
#define ft int t; scanf("%d", &t); for(int c=1; c<=t; c++)
#define w(n) while(n--)
#define visited 1
#define unvisited -1
#define debug printf("\n<<CameHere<<\n")
#define mem(x,y) memset(x, y, sizeof(x))
#define pal(temp) pali(temp, 0, temp.size()-1)
#define nl printf("\n")
#define space printf(" ");
#define eps 1e-9
#define inf 1<<28
#define cases printf("Case %d:", c);
#define all(v) (v).begin(), (v).end()
#define pb push_back
#define min3(a,b,c) min(min(a,b),c)
#define min4(a,b,c,d) min(min(a,b),min(c,d))
#define max3(a,b,c) max(max(a,b),c)
#define max4(a,b,c,d) max(max(a,b),max(c,d))
#define fin freopen("in.txt", "r", stdin)
#define fout freopen("out.txt", "w", stdout)
#define fast ios_base::sync_with_stdio(false); cin.tie(NULL)
#define gamma 0.57721566490153286060651209008240243
#define PI acos(-1)
#define pi 2*acos(0)
#define cos(a) cos(a*pi/180)
#define sin(a) sin(a*pi/180)
#define tan(a) tan(a*pi/180)
#define cosi(a) acos(a)/(pi/180)
#define sini(a) asin(a)/(pi/180)
#define tani(a) atan(a)/(pi/180)
#define tanii(a,b) atan2(a,b)/(pi/180)//tan(90) = Infinity or a/0
// log(a)=ln(a) base 2.718281828459044979,, log10(a) base 10;
#define powe(a) exp(a)//e^a
//Extended Geometry
#define dis(x1,y1,x2,y2) ((x1-x2)*(x1-x2))+((y1-y2)*(y1-y2))
#define t_area(a,b,c,s) sqrt(s*(s-a)*(s-b)*(s-c))
#define t_angle(a,b,c) cosi((b*b+c*c-a*a)/(2*b*c))

#define deb(x) cerr<< #x <<"="<<x<<endl;

#define si(a) int a; scanf("%d", &a);
#define sll(a) ll a; scanf("%lld", &a);
#define sllu(a) unsigned ll a; scanf("%llu", &a);
#define sd(a) double a; scanf("%lf", &a);

//#define p printf
/*Macro Ends here*/

using namespace std;

/*typedef start here*/

typedef string st;
typedef long long ll;
typedef vector <int> vi;
typedef vector <ll> vll;
typedef vector <string> vs;
typedef pair <int, int> ii;
typedef vector < pair <int, int> > vii;
typedef priority_queue<int,vector<int>,greater<int> > min_heap;

/*typedef ends here*/

/*Important functions starts here */

template <class T> T abs (T a, T b=0)
{
    if(b==0) return (a<0) ? -a : a;
    return (a>b) ? (a-b) : (b-a);
}

template <class T> inline T gcd(T a, T b)
{
    if(a<0) return gcd(-a, b);
    if(b<0) return gcd(a,-b);
    return (b==0) ? a : gcd(b, a%b);
}

ll xp(ll b, ll n, ll m) {
	ll r = 1;
	while(n > 0) {
		if(n & 1) {
			r = r * b;
			if(r >= m) r %= m;
		}
		n >>= 1;
		b = b * b;
		if(b >= m) b %= m;
	}
	return r % m;
}

ll inv(ll a, ll m){
    return xp(a, m-2, m);
}

bool pali(string temp, int i, int j)
{
    if(i>=j) return true;
    if(temp[i]==temp[j]) return pali(temp, i+1, j-1);
    return false;
}

/*Important functions ends here*/

/*Debug Extension starts here*/

template <typename F, typename S>
ostream& operator << (ostream& os, const pair< F, S>& p)
{
    return os<<"(" <<p.first<<", "<<p.second<<")";
}

template<typename T> ostream &operator << (ostream &os, const vector<T> &v)
{
    os<<"{";
    typename vector<T> :: const_iterator it;
    for(it= v.begin(); it!=v.end(); it++)
    {
        if(it!=v.begin()) os<<",";
        os<<*it;
    }
    return os<<"}";
}

template <typename T> ostream &operator << (ostream & os, const set<T>&v)
{
    os<<"[";
    typename set<T> :: const_iterator it;
    for(it=v.begin(); it!=v.end(); it++)
    {
        if(it!=v.begin()) os<<",";
        os<<*it;
    }
    return os<<"]";
}

template <typename F, typename S> ostream &operator << (ostream & os, const map<F,S>&v)
{
    os<<"[";
    typename map<F,S>::const_iterator it;

    for(it=v.begin(); it!=v.end(); it++)
    {
        if(it != v.begin()) os<<",";
        os<< it ->first<<"="<<it->second;
    }
    return os<<"]";
}

/*Debug Extension ends here*/

ll fact[100002];
ll m=1000000007;
int coun=0;

ll ncr(int n, int r) {
	ll niche=(fact[r]*fact[n-r])%m;
	niche=inv(niche, m);
	ll ans=(fact[n]*niche)%m;
	return ans;
}

void call(char ch){
	int n;
	if(ch>='0' and ch<='9') n=ch-'0';
	else if(ch>='A' and ch<='Z') n=ch-'A'+10;
	else if(ch>='a' and ch<='z') n=ch-'a'+36;
	else if(ch=='-') n=62;
	else n=63;
	int innercoun=6;
	while(n) {
		innercoun--;
		coun+=(n%2==0);
		n/=2;
	}
	coun+=innercoun;
}

//st check="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_";

int main(){
	fact[0]=fact[1]=1;
	f(i,2,100001) fact[i]=(fact[i-1]*(ll)i)%m;
	c(st, str);
	int sz=str.size();
	f(i,0,sz) call(str[i]);
	ll ans=0;
	f(i,0,coun+1) {
		ll temp=ncr(coun, i);
		temp*=xp(2, i, m);
		temp%=m;
		ans+=temp;
		ans%=m;
	}
	cout<<ans<<endl;
return 0;
}


#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define fast ios_base::sync_with_stdio(false); cin.tie(NULL)
string str;
map<ll,ll>mp;
inline void pre()
{
    int i;
    int cnt=0;
    for(i=0;i<=9;i++)
    {
        mp[i+48]=cnt;
        cnt++;
    }
    for(i=65;i<=90;i++)
    {
        mp[i]=cnt;
        cnt++;
    }
    for(i=97;i<=122;i++)
    {
        mp[i]=cnt;
        cnt++;
    }
    mp[45]=cnt;
    cnt++;
    mp[95]=cnt;
}
inline ll getval(ll val)
{
    ll ans=1;
    ll counter=6;
    while(counter--)
    {
        if((val&1)==0)
            ans=(ans*3)%1000000007;
        val>>=1;
    }
    return ans;
}
int main()
{
    fast;
    ll answer=1;
    pre();
    cin>>str;
    ll len=str.length();
    for(int i=0;i<len;i++)
    {

        ll pp=(int)str[i];
        ll fin=getval(mp[pp]);
        answer=(answer*fin)%1000000007;
    }
    cout<<answer;
}


#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define fast ios_base::sync_with_stdio(false); cin.tie(NULL)
string str;
map<ll,ll>mp;
inline void pre()
{
    int i;
    int cnt=0;
    for(i=0;i<=9;i++)
    {
        mp[i]=cnt;
        cnt++;
    }
    for(i=65;i<=90;i++)
    {
        mp[i]=cnt;
        cnt++;
    }
    for(i=97;i<=122;i++)
    {
        mp[i]=cnt;
        cnt++;
    }
    mp[45]=cnt;
    cnt++;
    mp[95]=cnt;
}
inline ll getval(ll val)
{
    ll ans=1;
    ll counter=6;
    while(counter--)
    {
        if((val&1)==0)
            ans=(ans*3)%1000000007;
        val>>=1;
    }
    return ans;
}
int main()
{
    fast;
    ll answer=1;
    pre();
    cin>>str;
    ll len=str.length();
    for(int i=0;i<len;i++)
    {
        ll pp=(int)str[i];
        ll fin=getval(mp[pp]);
        answer=(answer*fin)%1000000007;
    }
    cout<<answer;
}


#pragma warning(disable  4996)
#define _CRT_SECURE_NO_WARNINGS
//#include<bits/stdc++.h>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <algorithm>
#include<cstring>
#include<map>
#include<set>
#include<string>
#include <climits>
#include <vector>
#include<stack>
#include<bitset>
#include<unordered_map>
#include<queue>
#include<deque>
#include<iomanip>
#define endl '\n';
#define sz(s) int(s.size())
#define Ceil(x,y)  ((x+y-1)/y)
#define all(v) ((v).begin()),((v).end())
typedef long long ll;
typedef unsigned long long ull;
typedef double dl;
const ll mod = ll(1e9 + 7);
const double PI = acos(-1.0);
const int N = (int)1e7 + 1;
using namespace std;

void Selim()
{
	std::ios_base::sync_with_stdio(0);
	cin.tie(NULL);
	cout.tie(NULL);

#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
}
ll gcd(ll a, ll b) { return !b ? a : gcd(b, a % b); }
ll LCM(ll a, ll b) { return a / gcd(a, b)*b; }
//ll fact(long long  n) { return !n ? 1 : n * fact(n - 1); }
//transform(s.begin(), s.end(), s.begin(), ::tolower);
//palindrom if(s==string(s.rbegin(),s.rend()));
//memset(arr,0,sizeof arr)
int con(char c){
	if (c >= '0' && c <= '9'){
		return c - '0';
	}
	else if (c >= 'a' && c <= 'z'){
		return c - 'a' + 36;
	}
	else if (c >= 'A' && c <= 'Z'){
		return c - 'A' + 10;
	}
	else if (c == '-'){
		return 62;
	}
	else{
		return 63;
	}
}
int main()
{
	Selim();
	string s;
	cin >> s;
	ll ans = 1;
	for (int i = 0; i < sz(s); i++){
		int x = con(s[i]);
		for (int j = 0; j < 6; j++){
			if ((x&(1 << j)) == 0){
				ans = (ans * 3) % mod;
			}
		}
	}
	cout << ans << endl;
	return 0;
}


#pragma warning(disable  4996)
#define _CRT_SECURE_NO_WARNINGS
//#include<bits/stdc++.h>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <algorithm>
#include<cstring>
#include<map>
#include<set>
#include<string>
#include <climits>
#include <vector>
#include<stack>
#include<bitset>
#include<unordered_map>
#include<queue>
#include<deque>
#include<iomanip>
#define endl '\n';
#define sz(s) int(s.size())
#define Ceil(x,y)  ((x+y-1)/y)
#define all(v) ((v).begin()),((v).end())
typedef long long ll;
typedef unsigned long long ull;
typedef double dl;
const ll mod = ll(1e9 + 7);
const double PI = acos(-1.0);
const int N = (int)1e7 + 1;
using namespace std;

void Selim()
{
	std::ios_base::sync_with_stdio(0);
	cin.tie(NULL);
	cout.tie(NULL);

#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
}
ll gcd(ll a, ll b) { return !b ? a : gcd(b, a % b); }
ll LCM(ll a, ll b) { return a / gcd(a, b)*b; }
//ll fact(long long  n) { return !n ? 1 : n * fact(n - 1); }
//transform(s.begin(), s.end(), s.begin(), ::tolower);
//palindrom if(s==string(s.rbegin(),s.rend()));
//memset(arr,0,sizeof arr)
int con(char c){
	if (c >= 'a' && c <= 'z'){
		return c - 'a' + 36;
	}
	else if (c >= 'A' && c <= 'Z'){
		return c - 'A' + 10;
	}
	else if (c == '-'){
		return 62;
	}
	else{
		return 63;
	}
}
int main()
{
	Selim();
	string s;
	cin >> s;
	ll ans = 1;
	for (int i = 0; i < sz(s); i++){
		int x = con(s[i]);
		for (int j = 0; j < 6; j++){
			if ((x&(1 << j)) == 0){
				ans = (ans * 3) % mod;
			}
		}
	}
	cout << ans << endl;
	return 0;
}


#pragma warning(disable  4996)
#define _CRT_SECURE_NO_WARNINGS
//#include<bits/stdc++.h>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <algorithm>
#include<cstring>
#include<map>
#include<set>
#include<string>
#include <climits>
#include <vector>
#include<stack>
#include<bitset>
#include<unordered_map>
#include<queue>
#include<deque>
#include<iomanip>
#define endl '\n';
#define sz(s) int(s.size())
#define Ceil(x,y)  ((x+y-1)/y)
#define all(v) ((v).begin()),((v).end())
typedef long long ll;
typedef unsigned long long ull;
typedef double dl;
const ll mod = ll(1e9 + 7);
const double PI = acos(-1.0);
const int N = (int)1e7 + 1;
using namespace std;

void Selim()
{
	std::ios_base::sync_with_stdio(0);
	cin.tie(NULL);
	cout.tie(NULL);

#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
}
ll gcd(ll a, ll b) { return !b ? a : gcd(b, a % b); }
ll LCM(ll a, ll b) { return a / gcd(a, b)*b; }
//ll fact(long long  n) { return !n ? 1 : n * fact(n - 1); }
//transform(s.begin(), s.end(), s.begin(), ::tolower);
//palindrom if(s==string(s.rbegin(),s.rend()));
//memset(arr,0,sizeof arr)
int con(char c){
	if (c >= 'a' && c <= 'z'){
		return c - 'a' + 36;
	}
	else if (c >= 'A' && c <= 'Z'){
		return c - 'A' + 10;
	}
	else if (c == '-'){
		return 62;
	}
	else{
		return 63;
	}
}
int main()
{
	Selim();
	string s;
	cin >> s;
	int ans = 1;
	for (int i = 0; i < sz(s); i++){
		int x = con(s[i]);
		int zero = 0;
		for (int j = 0; j < 6; j++){
			if ((x&(1 << j)) == 0){
				zero++;
			}
		}
		for (int j = 0; j < zero; j++){
			ans = (ans * 3) % mod;
		}
	}
	cout << ans << endl;
	return 0;
}


#include<bits/stdc++.h>
#define ll long long
using namespace std;

const ll mod=1000000007;
ll n;
string st;

ll pow(ll a, ll b){
	ll ret=1;
	while(b>0){
		if(b&1) ret*=a;
		b/=2;
		a*=a;
	}
	return ret;
}

ll aton(char c){
	if(c=='-') return 62;
	if(c=='_') return 63;
	if(c<=9 && c>=0) return c-'0';
	if(c<='Z' && c>='A') return (c-'A')+10;
	if(c<='z' && c>='a') return (c-'a')+36;
}

ll pos(ll xx){
	ll cnt=0;
	for(ll i=0; i<6; i++){
		if(!((1<<i & (xx)))) cnt++;
	}
	return pow(3, cnt);
}

int main(){
	ll cval, ans=1;

	cin>>st;
	n = st.length();

	for(ll i=0; i<n; i++){
		cval=aton(st[i]);
		ans*= pos(cval);
		if(ans>=mod) ans%=mod;
 	}
 	cout<<ans<<endl;
}


#include<bits/stdc++.h>
#define ll long long
using namespace std;

const ll mod=1000000007;
ll n;
string st;

ll pow(ll a, ll b){
	ll ret=1;
	while(b>0){
		if(b&1) ret*=a;
		b/=2;
		a*=a;
	}
	return ret;
}

ll aton(char c){
	if(c=='-') return 62;
	if(c=='_') return 63;
	if(c<='9' && c>='0') return c-'0';
	if(c<='Z' && c>='A') return (c-'A')+10;
	if(c<='z' && c>='a') return (c-'a')+36;
}

ll pos(ll xx){
	ll cnt=0;
	for(ll i=0; i<6; i++){
		if(!((1<<i) & (xx))) cnt++;
	}
	return pow(3, cnt);
}

int main(){
	ll cval, ans=1;

	cin>>st;
	n = st.length();

	for(ll i=0; i<n; i++){
		cval=aton(st[i]);
//		cout<<cval<<"=cval\n";
		ans*= pos(cval);
		if(ans>=mod) ans%=mod;
 	}
 	cout<<ans<<endl;
}


#include <iostream>
#include <cstdio>
#include <algorithm>
#include <string>
#include <vector>
#include <queue>
#include <set>
#include <bitset>
#include <stack>
#include <bitset>
#include <sstream>
#include <fstream>
#include <map>
#include <cmath>
#define mod 1000000007
#define maxx 1000000000
#define lli long long
#define endl '\n'
#define pii pair<long long,long long>
//#define pii pair<int,int>
#define piii pair<pair<long long ,long long> ,long long>
using namespace std;
int main()
{
    lli n,h,k;
    ios::sync_with_stdio(0);
    lli ans=1;
    lli c;
    while((c=getchar())!=EOF&&c!=' '&&c!='\n'){
        lli k;
        if(c>=0&&c<=9)k=c-'0';
        else if(c>='A'&&c<='Z')k=c-'A'+10;
        else if(c>='a'&&c<='z')k=c-'a'+36;
        else if(c=='-')k=62;
        else k=63;
        int kk=6;
        while(kk--){
            if(k%2==0)ans*=3;
            k/=2;
            if(ans>mod)ans%=mod;
        }
    }
    cout<<ans;
}


#include <iostream>
#include <cstdio>
#include <algorithm>
#include <string>
#include <vector>
#include <queue>
#include <set>
#include <bitset>
#include <stack>
#include <bitset>
#include <sstream>
#include <fstream>
#include <map>
#include <cmath>
#define mod 1000000007
#define maxx 1000000000
#define lli long long
#define endl '\n'
#define pii pair<long long,long long>
//#define pii pair<int,int>
#define piii pair<pair<long long ,long long> ,long long>
using namespace std;
int main()
{
    lli n,h,k;
    ios::sync_with_stdio(0);
    lli ans=1;
    char c;
    string s;
    cin>>s;
    //int con=0;
    for(int i;i<s.length();i++){
        lli k;
        c=s[i];
        if(c>='0'&&c<='9')k=c-'0';
        else if(c>='A'&&c<='Z')k=c-'A'+10;
        else if(c>='a'&&c<='z')k=c-'a'+36;
        else if(c=='-')k=62;
        else if(c=='_') k=63;
        lli kk=6;
        //cout<<c<<' '<<k<<endl;
        while(kk--){
            if(k%2==0)ans=ans*3%mod;
            k/=2;
        }
    }
    cout<<ans;
}


#include <bits/stdc++.h>
#define uint unsigned int
#define int long long int
using namespace std;
const int mod=1e9+7;
int fact[300010];
int power(int x,int n)
{
    int res=1;
    while(n>0)
    {
        if(n%2==1)
        res=(res*x)%mod;
        x=(x*x)%mod;
        n/=2;
    }
    return res%mod;
}
void factorial()
{
    fact[0]=fact[1]=1;
    for(int i=2;i<300005;i++)
    fact[i]=(fact[i-1]*i)%mod;
}
int inv(int n)
{
    return power(n,mod-2)%mod;
}
int comb(int n,int k)
{
    int ans=1;
    ans=(ans*fact[n])%mod;
    ans=(ans*power(fact[n-k],mod-2))%mod;
    ans=(ans*power(fact[k],mod-2))%mod;
    return ans;
}
int solve(int x,int n)
{
    int ans=0;
    for(int i=2;(i*i*i)<=x;i++)
    {
        ans+=(x/(i*i*i));
    }
    return (ans);
}
int check(int x)
{
    int ans=0;
    while(x>0)
    {
        ans+=(x%2);
        x/=2;
    }
    return (6-ans);
}
int32_t main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);

    factorial();
    int t;
    t=1;
  //  cin>>t;
    while(t--)
    {
       string s;
       cin>>s;
       map<char,int>mp;
       for(int i=0;i<=9;i++)
       {
           mp[i+'0']=check(i);
       }
       int i,j,k;
       char c='A';
       for(i=10;i<=35;i++)
       {
           mp[c]=check(i);
           c++;
       }
       c='a';
       for(i=36;i<=61;i++)
       {
        mp[c]=check(i);
        c++;
       }
       mp['-']=check(62);
       mp['_']=check(63);
       int ans=1;
       for(i=0;i<s.size();i++)
       {
           ans=(ans*(power(3,mp[s[i]])))%mod;
       }
       //ans=(ans+ans-1+mod)%mod;
       cout<<ans;
    }
}


#include <bits/stdc++.h>
#define uint unsigned int
#define int long long int
using namespace std;
const int mod=1e9+7;
int fact[300010];
int power(int x,int n)
{
    int res=1;
    while(n>0)
    {
        if(n%2==1)
        res=(res*x)%mod;
        x=(x*x)%mod;
        n/=2;
    }
    return res%mod;
}
void factorial()
{
    fact[0]=fact[1]=1;
    for(int i=2;i<300005;i++)
    fact[i]=(fact[i-1]*i)%mod;
}
int inv(int n)
{
    return power(n,mod-2)%mod;
}
int comb(int n,int k)
{
    int ans=1;
    ans=(ans*fact[n])%mod;
    ans=(ans*power(fact[n-k],mod-2))%mod;
    ans=(ans*power(fact[k],mod-2))%mod;
    return ans;
}
int solve(int x,int n)
{
    int ans=0;
    for(int i=2;(i*i*i)<=x;i++)
    {
        ans+=(x/(i*i*i));
    }
    return (ans);
}
int check(int x)
{
    int ans=0;
    while(x>0)
    {
        ans+=(x%2);
        x/=2;
    }
    return (6-ans);
}
int32_t main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);

    factorial();
    int t;
    t=1;
  //  cin>>t;
    while(t--)
    {
       string s;
       cin>>s;
       map<char,int>mp;
       for(int i=0;i<=9;i++)
       {
           mp[i+'0']=check(i);
       }
       int i,j,k;
       char c='A';
       for(i=10;i<=35;i++)
       {
           mp[c]=check(i);
           c++;
       }
       c='a';
       for(i=36;i<=61;i++)
       {
        mp[c]=check(i);
        c++;
       }
       mp['-']=check(62);
       mp['_']=check(63);
       int ans=1;
       for(i=0;i<s.size();i++)
       {
           if(s[i]!='_')
           ans=(ans*(power(3,mp[s[i]])))%mod;
       }
       //ans=(ans+ans-1+mod)%mod;
       cout<<ans;
    }
}


#include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
#define endl "\n"
#define fi first
#define sec second
#define pb push_back
#define test cout<<"debuged\n";
#define INF ll(1e18)
#define MOD 1000000007
#define debug(x) cout<<x<<"\n";
#define pll pair<ll,ll>
#define all(v) v.begin(),v.end()

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    #ifndef ONLINE_JUDGE
    freopen("input.txt","r",stdin);
    freopen("output.txt","w",stdout);
    #endif

    ll n,m,k;
    cin>>n>>m;
    ll a[n][m];
    for(ll i=0;i<n;i++)
    {
        for(ll j=0;j<m;j++)
            cin>>a[i][j];
    }
    ll dp[n]={1};
    for(ll i=0;i<m;i++)
    {
        ll c=1;
        for(ll j=1;j<n;j++)
        {
           if(a[j][i]>=a[j-1][i])
           {
            c++;
            dp[j]=max(dp[j],c);
           }
           else
           {
            c=1;
           }
        }
    }
    cin>>k;
    while(k--)
    {
        ll x,y;
        cin>>x>>y;
        if(dp[--y]>=(y-x+1))
            cout<<"Yes\n";
        else
            cout<<"No\n";
    }

}


# -*- coding: utf-8 -*-
"""
Created on Sat Feb 29 05:27:25 2020

@author: hp
"""

t = int(input())
for i in range(t):
    n = int(input())
    lst = [int(j) for j in input().split()]
    a=[0]*2*n
    y = True
    for j in range(n):
        a[2*j] = lst[j]
    for j in range(n):
        x = a[2*j] + 1
        z = True
        k=0
        while(z==True):
            if(x+k not in a):
                a[2*j+1]=x+k
                z =False
            k+=1
    for j in range(2*n):
        if(j+1 not in a):
            y = False
            break
    if(y==False):
        print(-1)
    else:
        for j in a:
            print(j,end=" ")


import itertools
for i in range(int(input())):
   n=int(input())
   l=[int(k) for k in input().split()][:n]
   l1=list(set(list(range(1,2*n+1))).difference(set(l)))
   if(n==1):
       print("1","2")
   else:
       d=-1
       for j in list(itertools.permutations(l1)):
           m=-1
           for k in range(0,n):
               if(l[k]!=min(l[k],j[k])):
                   m=1
                   break
           if(m==-1):
               k=list(j)
               for h in range(0,n):
                   print(l[h],k[h],end=" ")
                   d=1
               print()
               break
       if(d==-1):
           print(-1)


import itertools
for i in range(int(input())):
   n=int(input())
   l=[int(k) for k in input().split()][:n]
   if(n==1):
       print("1","2")
   else:
       t=list(itertools.permutations(list(range(1,2*n+1))))
       d=-1
       for j in t:
            k=0
            m=-1
            while(k<n):
                if(l[k]==min(j[2*k],j[2*k+1])):
                    pass
                else:
                    m=1
                    break
                k=k+1
            if(m==-1):
                z=list(j)
                for y in z:
                    print(y,end=" ")
                d=1
                print()
                break
       if(d==-1):
           print(-1)


import copy
for i in range(int(input())):
    n=int(input())
    l=[int(j) for j in input().split()][:n]
    t=copy.deepcopy(l)
    l1=list(set(list(range(1,2*n+1))).difference(set(t)))
    l1.sort()
    t.sort()
    h=-1
    for j in range(n):
        if(l1[j]<t[j]):
            h=1
            break
        else:
            a=l.index(t[j])
            l.insert(a+1,l1[j])
    if(h==-1):
        for k in l:
            print(k,end=" ")
        print()
    else:
        print("-1")


import itertools
for i in range(int(input())):
   n=int(input())
   l=[int(k) for k in input().split()][:n]
   l1=list(set(list(range(1,2*n+1))).difference(set(l)))
   if(n==1):
       print("1","2")
   else:
       t=list(itertools.permutations(l1))
       d=-1
       for j in t:
           m=-1
           for k in range(0,n):
               if(l[k]!=min(l[k],j[k])):
                   m=1
                   break
           if(m==-1):
               k=list(j)
               for h in range(0,n):
                   print(l[h],k[h],end=" ")
                   d=1
               print()
               break
       if(d==-1):
           print(-1)


import copy
for i in range(int(input())):
    n=int(input())
    l=[int(j) for j in input().split()][:n]
    l1=list(set(list(range(1,2*n+1))).difference(set(l)))
    t=copy.deepcopy(l)
    l1.sort()
    m=-1
    for k in range(n):
        h=-1
        for j in range(n):
            if(l1[j]>t[k]):
                if l1[j] not in l:
                    a=l.index(t[k])
                    l.insert(a+1,l1[j])
                    h=1
                    break
        if(h==-1):
            print("-1")
            m=1
            break
    if(m==-1):
        for k in l:
            print(k,end=" ")
        print()


t = int(input())
for x in range(t):
    n = int(input())
    arr = list(map(int, input().split()))
    count = 0
    a = 0
    out = []
    fail = False
    while(a < n):
        out.append(arr[a])
        count = out[-1]
        while(count < 2*n):
            count+=1
            if (not count in arr) and (not count in out):
                if count > arr[a]:
                    out.append(count)
                    count = 2*n + 10
        if(out[-1] == arr[a]):
            fail = True
            a = 2*n + 1
        a+=1
    if fail:
        print(int(-1))
    else:
        print(*out)


t=int(input())
while(t):
    t-=1
    n=int(input())
    li=list(map(int,input().split()))
    b_li=[0]*(2*n)
    for i in range(0,n):
        b_li[i*2]=li[i]
    have=[]
    for i in range(1,2*n+1):
        if i not in li:
            have.append(i)
    for i in range(1,2*n+1,2):
        pre=b_li[i-1]
        flag=0
        for j in range(len(have)):
            if have[j]>pre:
                flag=1
                break
        if flag==1:
            b_li[i]=have[j]
            del(have[j])
        else:
            print(-1)
            break
    if (flag==1):
        for i in b_li:
            print(i,end=" ")
        print()


t=int(input())
while(t):
    t-=1
    n=int(input())
    li=list(map(int,input().split()))
    b_li=[0]*(2*n)
    for i in range(0,n):
        b_li[i*2]=li[i]
    have=[]
    for i in range(1,2*n+1):
        if i not in li:
            have.append(i)
    for i in range(1,2*n+1,2):
        pre=b_li[i-1]
        flag=0
        for j in range(len(have)):
            if have[j]>pre:
                flag=1
                break
        if flag==1:
            b_li[i]=have[j]
            del(have[j])
        else:
            print(-1)
            break
    if (flag==1):
        print(b_li)


for _ in range(int(input())):
    n = int(input())
    B = list(map(int, input().split()))
    A = [0]*(2*n)
    A[::2] = B
    X = set(range(1, 2*n+1)) - set(B)
    for i in range(n):
        x = B[i] + 1
        while x <= 2*n:
            if x in X:
                A[2*i+1] = x
                X.remove(x)
                break
            x += 1
        else:
            print(-1)
            break
    else:
        print(*A)


def solve(m, b):
    d=dict()
    y=dict()
    for i in range(m):
        d[b[i]]=0

    for k in d.keys():
        x=k+1
        while x in d.keys() or x in y.keys():
            x+=1
        if (x>2*m):
            return -1
        d[k]=x
        y[x]=k

    for i in range(m):
        print(b[i], d[b[i]], end=" ")
    print()

    return 1

for _ in range(int(input())):
    m=int(input())
    b=list(map(int, input().split()))

    if (solve(m, b)==-1):
        print(-1)


import sys
import collections
input = sys.stdin.readline

def main():
    t = int(input())
    for _ in range(t):
        N = int(input())
        B = [int(x) for x in input().split()]
        c = collections.Counter()

        ans = []
        for b in B:
            if c[b] > 0:
                print(-1)
                break
            ans.append(b)
            c[b] += 1
            i = 1
            while c[b + i] != 0 or b + i in B:
                i += 1
            ans.append(b + i)
            c[b + i] += 1
        else:
            for i in range(1, 2 * N + 1):
                if c[i] == 0:
                    print(-1)
                    break
            else:
                print(*ans)

if __name__ == '__main__':
    main()


import sys
input = sys.stdin.readline

def main():
    t = int(input())
    for _ in range(t):
        N = int(input())
        B = [int(x) for x in input().split()]
        ans = []
        for b in B:
            ans.append(b)
            ans.append(b + 1)

        print(*ans)

if __name__ == '__main__':
    main()


for _ in range(int(input())):
    n = int(input())
    b = list(map(int, input().split()))
    ans = []
    for i in b:
        ans.append(i)
        t = i+1
        while(t in b) or (t in ans):
            t += 1
        ans.append(t)
    if(max(ans) == 2*n):
        print(*ans)
    else:
        print("-1")


def main(n, b):
	#print("DEBUT")
	tab = [0]*(2*n)
	where = [0]*(2*n)
	for i in range(n):
		where[b[i]-1] = i
		tab[2*i] = b[i]
	a = sorted(b)
	test = True
	imax, j = next(0, a, 0)
	for i in range(n):
		if a[i] > j:
			test = False
		tab[where[a[i]-1]*2 + 1] = j
		imax, j = next(j, a, imax)
	#print("SOLUCE")
	if not test:
		print(-1)
	else:
		mot = ""
		for x in tab:
			mot += str(x) + " "
		print(mot)
	#print("END")

def next(j, a, imax):
	test = True
	j += 1
	while imax < n and test:
		if a[imax] == j:
			j += 1
			imax += 1
		else:
			test = False
	return(imax, j)

t = int(input())
for _ in range(t):
	n = int(input())
	b = list(map(int, input().split()))
	main(n, b)


def main(n, b):
	#print("DEBUT")
	tab = [0]*(2*n)
	dispo = [True]*(2*n + 1)
	for i in range(n):
		tab[2*i] = b[i]
		dispo[b[i]] = False
	for i in range(n):
		j = b[i]
		test = True
		while j <= (2*n) and test:
			if not dispo[j]:
				j += 1
			else:
				test = False
				dispo[j] = False
		tab[2*i + 1] = j
	test = True
	for i in range(1, 2*n+1):
		if dispo[i]:
			test = False

	#print("SOLUCE")
	if not test:
		print(-1)
	else:
		mot = ""
		for x in tab:
			mot += str(x) + " "
		print(mot)
	#print("END")

t = int(input())
for _ in range(t):
	n = int(input())
	b = list(map(int, input().split()))
	main(n, b)


def bubbleSort(arr):
    n = len(arr)

    # Traverse through all array elements
    for i in range(n):

        # Last i elements are already in place
        for j in range(0, n-i-1):

            # traverse the array from 0 to n-i-1
            # Swap if the element found is greater
            # than the next element
            if arr[j] < arr[j+1] :
                arr[j], arr[j+1] = arr[j+1], arr[j]
number_of_testcase=int(input())
for i in range(number_of_testcase):
    n=int(input())
    numbers_list=list(map(int,input().split(' ')))
    initial_list=numbers_list.copy()
    #available_numbers=list(set(range(1,2*n+1))-set(initial_list))
    available_numbers=[x for x in list(range(1,2*n+1)) if x not in initial_list]
    #print(available_numbers)
    flag2=1
    final_dict={}
    for i in initial_list:
        flag=0
        for j in available_numbers:
            if(i<j):
                flag=1
                final_dict[i]=j
                available_numbers.remove(j)
                break
        if(flag==0):
            print('-1')
            flag2=0
            break
    if(flag2==1):
        for j in initial_list:
            print(str(j)+' '+str(final_dict[j]),end=' ')
        print('')


def bubbleSort(arr):
    n = len(arr)

    # Traverse through all array elements
    for i in range(n):

        # Last i elements are already in place
        for j in range(0, n-i-1):

            # traverse the array from 0 to n-i-1
            # Swap if the element found is greater
            # than the next element
            if arr[j] < arr[j+1] :
                arr[j], arr[j+1] = arr[j+1], arr[j]
number_of_testcase=int(input())
for i in range(number_of_testcase):
    n=int(input())
    numbers_list=list(map(int,input().split(' ')))
    initial_list=numbers_list.copy()
    bubbleSort(numbers_list)
    available_numbers=list(range(1,2*n+1))
    #print(numbers_list)
    #print(available_numbers)
    numbers_dict={}
    flag=1
    for i in numbers_list:
        if(available_numbers[-1]>i):
            numbers_dict[i]=available_numbers[-1]
            #print(str(available_numbers[-1])+' is kept for '+str(i))
            available_numbers.remove(i)
            available_numbers.remove(available_numbers[-1])

        else:
            print('-1')
            flag=0
            break
    if(flag==1):
        for j in initial_list:
            print(str(j)+' '+str(numbers_dict[j]),end=' ')
        print('')


def res(n,l):
   l1=[]
   d={}
   for j in range(1,2*n+1):
      if j not in l:
         l1.append(j)
   for i in l:
      for j in l1:
         if j>i:
            d[i]=j
            l1.remove(j)
            break
   if len(l1)!=0:
      return False
   else:
      return d

t=int(input())
for i in range(t):
   n=int(input())
   l=[int(x) for x in input().split()]
   x=res(n,l)
   if x==False:
      print("-1")
   else:
      for k in l:
         print(k,x[k],end=" ")
      print("\n")


def res(n,l):
   l1=[]
   d={}
   l3=sorted(l)
   for j in range(1,2*n+1):
      if j not in l:
         l1.append(j)
   for i in range(n-1,-1,-1):
            if l3[i]<l1[i]:
               d[l3[i]]=l1[i]
            else:
               return False
   return d

t=int(input())
for i in range(t):
   n=int(input())
   l=[int(x) for x in input().split()]
   x=res(n,l)
   if x==False:
      print("-1")
   else:
      for k in l:
         print(k,x[k],end=" ")
      print("\n")


import sys

t = int(sys.stdin.readline())
for _ in range(t):
    n = int(sys.stdin.readline())

    sq = []
    bq = [int(b) for b in sys.stdin.readline().split()]
    aq = [True] * (2*n+1)
    for b in bq:
        aq[b] = False
    for b in bq:
        sq.append(b)
        j = b+1
        while j <= 2*n:
            if aq[j]:
                aq[j] = False
                sq.append(j)
                break
            j+=1
        else:
            print(-1)
            break
    else:
        sys.stdout.write(str(sq[0]))
        for s in sq[1:]:
            sys.stdout.write(" ")
            sys.stdout.write(str(s))
        sys.stdout.write("\n")


t=int(input())
for i in range(0,t):
    o=[]
    n=int(input())
    l=list(map(int,input().split()))
    e=0
    for j in range(0,len(l)):
        o.append(l[j])
        c=l[j]+1
        if c>2*n:
            e=1
            break
        else:
            while c in l or c in o:
                c+=1
                if c>2*n:
                    e=1
                    break
        if e==1:
            break
        o.append(c)
    if e==1:
        print(-1)
    else:
        for k in range(0,len(o)):
            print(o[k],end=' ')
        print()


t=int(input())
for i in range(0,t):
    n=int(input())
    l=list(map(int,input().split()))
    e=0
    o = []
    for j in range(0,n):
        a=l[j]
        b=l[j]
        if b>2*n:
            e=1
            break
        if b in o:
            while b in o:
                b = b + 1
                if b > 2 * n:
                    e = 1
                    break
        c=b+1
        if c>2*n:
            e=1
            break
        if c in o:
            while c in o:
                c = c + 1
                if c > 2 * n:
                    e = 1
                    break
        if e==1:
            break
        o.append(b)
        o.append(c)
    if e==1:
        print(-1)
    else:
        for k in range(0,len(o)):
            print(o[k],end=' ')
        print()


def mi():return map(int,input().split())
def li():return list(mi())
def ii():return int(input())
def si():return input()
t=ii()
while(t):
    t-=1
    n=ii()
    a=li()
    b=a[:]
    b.sort()
    a1=[]
    l=0
    for i in range(1,2*n+1):
        if(l<len(b) and i==b[l]):
            l+=1
        else:
            a1.append(i)
    f=0
    m={}
    for i in range(n):
        if(b[i]>a1[i]):
            f=1
        m[b[i]]=a1[i]
    if(f):
        print('-1')
    else:
        for i in a:
            print(min(i,m[i]),max(i,m[i]),end=" ")
        print()


def mi():return map(int,input().split())
def li():return list(mi())
def ii():return int(input())
def si():return input()
t=ii()
while(t):
    t-=1
    n=ii()
    a=li()
    b=a[:]
    b.sort()
    a1=[]
    l=0
    for i in range(1,2*n+1):
        if(l<len(b) and i==b[l]):
            l+=1
        else:
            a1.append(i)
    f=0
    m={}
    for i in range(n):
        if(b[i]>a1[i]):
            f=1
        m[b[i]]=a1[i]
    if(f):
        print('-1')
    else:
        for i in a:
            print(i,end=" ")
            for j in range(n):
                if(a1[j]>i):
                    print(a1[j],end=" ")
                    a1[j]=0
                    break
        print()


for _ in range(int(input())):
    n = int(input())
    arr = list(map(int, input().split()))
    arr2 = []
    for i in arr:
        arr2.append(i)
        t = i+1
        while t in arr or t in arr2:
            t += 1
        arr2.append(t)
    if max(arr2) == 2 * n:
        print(*arr2)
    else:
        print("-1")


t = int(input())
solutions = []
for i in range(t) :
    n = int(input())
    string = str(input())
    st = string.split()
    lst = []
    for j in range(n) :
        lst.append(int(st[j]))
    solution = []
    for j in range(n) :
        solution.append(lst[j])
        number = lst[j]
        ok = 0
        while ok == 0 and number < 2*n :
            number= number +1
            if number not in solution and number not in lst :
                ok =1
        if ok == 1 :
            solution.append(number)
    if len(solution) == 2*n :
        solutions.append(solution)
    else :
        solutions.append([-1])
for i in range(t) :
    for number in solutions[i] :
        print(number, end=" ")
    print()


t=int(input())
for i in range(t):
    op=[]
    n=int(input())
    x=list(input().split())
    xi=[int(i) for i in x]
    for j in range(2*n):
        if j%2==0:
            t=xi[j//2]
            op.append(t)
        else:
            op.append(0)
    xx=1
    for j in range(n):
        z=op[xx-1]+1
        if z in op:
            op[xx]=z+1
        else:
            op[xx]=z
        xx+=2
    if max(xi)>(2*n):
        print("-1")
    elif 0 in op:
        print("-1")
    else:
        for j in range(len(op)):
            print(op[j],end=" ")
        print()


t=int(input())
for i in range(t):
    op=[]
    n=int(input())
    x=list(input().split())
    xi=[int(i) for i in x]
    for j in range(2*n):
        if j%2==0:
            t=xi[j//2]
            op.append(t)
        else:
            op.append(0)
    xx=1
    for j in range(n):
        z=op[xx-1]+1
        if z in op:
            op[xx]=z+1
        else:
            op[xx]=z
        xx+=2
    s=set(op)
    if max(op)>(2*n):
        print("-1")
    elif 0 in op:
        print("-1")
    elif len(s)<(2*n):
        print("-1")
    else:
        for j in range(len(op)):
            print(op[j],end=" ")
        print()


t=int(input())
for i in range(t):
    op=[]
    n=int(input())
    x=list(input().split())
    xi=[int(i) for i in x]
    for j in range(2*n):
        if j%2==0:
            t=xi[j//2]
            op.append(t)
        else:
            op.append(0)
    xx=1
    for j in range(n):
        z=op[xx-1]+1
        if z in op:
            op[xx]=z+1
        else:
            op[xx]=z
        xx+=2
    s=set(op)
    print(s)
    if max(op)>(2*n):
        print("-1")
    elif 0 in op:
        print("-1")
    elif len(s)<(2*n):
        print("-1")
    else:
        for j in range(len(op)):
            print(op[j],end=" ")
        print()


t=int(input())
for i in range(t):
    op=[]
    n=int(input())
    x=list(input().split())
    xi=[int(i) for i in x]
    for j in range(2*n):
        if j%2==0:
            t=xi[j//2]
            op.append(t)
        else:
            op.append(0)
    xx=1
    for j in range(n):
        z=op[xx-1]+1
        if z in op:
            for q in range(z+1,(2*n)):
                if q not in op:
                    op[xx]=q
        else:
            op[xx]=z
        xx+=2
    if max(op)>(2*n):
        print("-1")
    elif 0 in op:
        print("-1")
    else:
        for j in range(len(op)):
            print(op[j],end=" ")
        print()


t=int(input())
for i in range(t):
    op=[]
    n=int(input())
    x=list(input().split())
    xi=[int(i) for i in x]
    for j in range(2*n):
        if j%2==0:
            t=xi[j//2]
            op.append(t)
        else:
            op.append(0)
    t=0
    xx=1
    op[2*n-1]=2*n
    while(t!=5):
        for j in range(1,(2*n+1)):
            if j not in op and j>op[xx-1]:
                op[xx]=j
                xx+=2
        t+=1
    if 0 in op:
        print("-1")
    else:
        for j in range(len(op)):
            print(op[j],end=" ")


t=int(input())
for i in range(t):
    op=[]
    n=int(input())
    x=list(input().split())
    xi=[int(i) for i in x]
    for j in range(2*n):
        if j%2==0:
            t=xi[j//2]
            op.append(t)
        else:
            op.append(0)
    t=0
    xx=1
    op[2*n-1]=2*n
    while(t!=5):
        for j in range(1,(2*n+1)):
            if j not in op and j>op[xx-1]:
                op[xx]=j
                xx+=2
        t+=1
    if 0 in op:
        print("-1")
    else:
        for j in range(len(op)):
            print(op[j],end=" ")
        print()


t=int(input())
for i in range(t):
    op=[]
    n=int(input())
    x=list(input().split())
    xi=[int(i) for i in x]
    for j in range(2*n):
        if j%2==0:
            t=xi[j//2]
            op.append(t)
        else:
            op.append(0)
    xx=1
    for j in range(n):
        z=op[xx-1]+1
        if z in op:
            for q in range(z+1,(2*n+1)):
                if q not in op:
                    op[xx]=q
                    break
        else:
            op[xx]=z
        xx+=2
    if max(op)>(2*n):
        print("-1")
    elif 0 in op:
        print("-1")
    else:
        for j in range(len(op)):
            print(op[j],end=" ")
        print()


n = int(input())

for i in range(n):
    lena = int(input())
    arr = list(map(int, input().split()))
    rem = [j for j in list(range(1, 2*lena+1)) if j not in arr]
    counter = 0
    final = []

    for j in range(lena):
        counter2 = 0
        for k in range(arr[j], 2*lena+1):
            if k in rem:
                final.append(arr[j])
                final.append(k)
                rem.remove(k)
                counter2 = 1
                break
        if counter2 == 0:
            print(-1)
            counter = 1
            break

    if counter == 0:
        print(*final)


for T in range(int(input())):
    n = int(input())
    b = list(map(int, input().split()))
    Ans = []
    Exist = [False] * (2 * n + 100)
    Bad = False
    for i in b : Exist[i] = True
    for i in range(n):
        Ans.append(b[i])
        Number = b[i] + 1
        while Exist[Number] == True and Number < 2 * n: Number += 1
        if Number <= 2 * n and Exist[Number] == False:
            Ans.append(Number)
            Exist[Number] = True
        else:
            Bad = True
            break
    if Bad : print(-1)
    else : print(*Ans)


for _ in range(int(input())):
    n = int(input())
    lst = list(map(int,input().split()))
    lst2 = []
    for i in range(1,2*n+1):
        lst2.append(i)
    if max(lst) < len(lst):
        print(-1)
    else:
        for i in lst:
            lst2.remove(i)
        lst3 = []
        lst4 = [False] * n
        for i in lst:
            for j in lst2:
                if i < j and lst4[lst2.index(j)] == False:
                    lst3.append(i)
                    lst3.append(j)
                    lst4[lst2.index(j)] = True
                    break
        if len(lst3) == 2*n:
            print(" ".join(map(str,lst3)))
        else:
            print(-1)


for _ in range(int(input())):
	n = int(input())
	arr = list(map(int,input().split()))
	s = set()
	for i in range(1,2*n +1):
		s.add(i)
	for i in arr:
		s.discard(i)
	a = []
	b = True
	for i in arr:
		if i+1>2*n:
			b = False
		else:
			if i+1 in s:
				a+=[i+1]
				s.discard(i+1)
			else:
				c = False
				for t in s:
					if t>i:
						a+=[t]
						s.discard(t)
						c = True
						break
				if not c:
					b = False
					break
	if not b:
		print(-1)
	else:
		for i in range(n):
			print(arr[i],a[i],end=" ")


for _ in range(int(input())):
    n=int(input())
    b=[int(x) for x in input().split()]
    if 1 not in b or 2*n in b:
        print(-1)
    else:
        s=set(b)
        arr=[]
        for i in range(n):
            j=b[i]+1
            while True:
                if j not in s:
                    arr.append(j)
                    s.add(j)
                    break
                j+=1
        print(*[str(b[x])+" "+str(arr[x]) for x in range(n)])


def solve(n,b):
    if 1 not in b or 2*n in b:
        return ([-1])
    else:
        s=set(b)
        arr=[]
        for i in range(n):
            j=b[i]+1
            while True:
                if j not in s and j<=2*n:
                    arr.append(j)
                    s.add(j)
                    break
                elif j>2*n:
                    return ([-1])
                j+=1
        return ([str(b[x])+" "+str(arr[x]) for x in range(n)])
for _ in range(int(input())):
    n=int(input())
    b=[int(x) for x in input().split()]
    print(*solve(n,b))


t=int(input())
for i in range(t):
    n=int(input())
    L=[int(j) for j in input().split()]
    L1=[0]*(2*n)
    L2=[]
    for k in range(0,2*n,2):
        L1[k]=L[k//2]
    for l in range(1,(2*n)+1,1):
        if(l not in L1):
            L2.append(l)
    for x in range(n):
        for y in range(0,2*n,2):
            if(L1[y+1]==0):
                if(L2[x]>L1[y]):
                    L1[y+1]=L2[x]
                    break
    if(0 in L1):
        print(-1)
    else:
        print(*L1)


from bisect import bisect_left

def main():
    for _ in range(int(input())):
        n, res = int(input()), []
        l = list(map(int, input().split()))
        r = sorted(set(range(1, n * 2 + 1)) - set(l))
        try:
            for a in l:
                res += a, r.pop(bisect_left(r, a + 1))
            print(*res)
        except IndexError:
            print(-1)

if __name__ == '__main__':
    main()


I=input
for _ in[0]*int(I()):
 I();b=*map(int,I().split()),;s={*range(2*len(b)+1)}-{*b};a=[]
 try:
  for x in b:a+=x,min(s-{*range(x)});s-={*a}
 except:a=-1,
 print(*a)


for nt in range(int(input())):
	n=int(input())
	b=list(map(int,input().split()))
	d=set(b)
	ansflag=0
	ans=[]
	d1={}
	for i in range(n):
		ans.append(b[i])
		k=1
		flag=0
		#print (ans)
		while True:
			if (b[i]+k)>2*n:
				flag=1
				break
			if b[i]+k not in d and b[i]+k not in d1:
				ans.append(b[i]+k)
				d1[b[i]+k]=1
				break
			else:
				k+=1
		if flag==1:
			print (-1)
			ansflag=1
			break
	if ansflag!=1:
		print (*ans)


##############--->>>>> Deepcoder Amit Kumar Bhuyan <<<<<---##############

"""
 Perfection is achieved not when there is nothing more to add, but rather when there is nothing more to take away.
"""
from __future__ import division, print_function

import os,sys
from io import BytesIO, IOBase

if sys.version_info[0] < 3:
    from __builtin__ import xrange as range
    from future_builtins import ascii, filter, hex, map, oct, zip

def ii():  return int(input())
def si():  return input()
def mi():  return map(int,input().strip().split(" "))
def msi(): return map(str,input().strip().split(" "))
def li():  return list(mi())

def dmain():
    sys.setrecursionlimit(1000000)
    threading.stack_size(1024000)
    thread = threading.Thread(target=main)
    thread.start()

#from collections import deque, Counter, OrderedDict,defaultdict
#from heapq import nsmallest, nlargest, heapify,heappop ,heappush, heapreplace
#from math import log,sqrt,factorial,cos,tan,sin,radians
#from bisect import bisect,bisect_left,bisect_right,insort,insort_left,insort_right
#from decimal import *
#import threading
#from itertools import permutations
#Copy 2D list  m = [x[:] for x in mark] .. Avoid Using Deepcopy
import sys
input = sys.stdin.readline
scanner = lambda: int(input())
string = lambda: input().rstrip()
get_list = lambda: list(read())
read = lambda: map(int, input().split())
get_float = lambda: map(float, input().split())
# from bisect import bisect_left as lower_bound;
# from bisect import bisect_right as upper_bound;
# from math import ceil, factorial;

def ceil(x):
    if x != int(x):
        x = int(x) + 1
    return x

def factorial(x, m):
	val = 1
	while x>0:
		val = (val * x) % m
		x -= 1
	return val

def fact(x):
	val = 1
	while x > 0:
		val *= x
		x -= 1
	return val

# swap_array function
def swaparr(arr, a,b):
    temp = arr[a];
    arr[a] = arr[b];
    arr[b] = temp;

## gcd function
def gcd(a,b):
    if b == 0:
        return a;
    return gcd(b, a % b);

## lcm function
def lcm(a, b):
	return (a * b) // math.gcd(a, b)

def is_integer(n):
	return math.ceil(n) == math.floor(n)

## nCr function efficient using Binomial Cofficient
def nCr(n, k):
	if k > n:
		return 0
	if(k > n - k):
		k = n - k
	res = 1
	for i in range(k):
		res = res * (n - i)
		res = res / (i + 1)
	return int(res)

## upper bound function code -- such that e in a[:i] e < x;

## prime factorization
def primefs(n):
    ## if n == 1    ## calculating primes
    primes = {}
    while(n%2 == 0 and n > 0):
        primes[2] = primes.get(2, 0) + 1
        n = n//2
    for i in range(3, int(n**0.5)+2, 2):
        while(n%i == 0 and n > 0):
            primes[i] = primes.get(i, 0) + 1
            n = n//i
    if n > 2:
        primes[n] = primes.get(n, 0) + 1
    ## prime factoriazation of n is stored in dictionary
    ## primes and can be accesed. O(sqrt n)
    return primes

## MODULAR EXPONENTIATION FUNCTION
def power(x, y, p):
    if y == 0:
        return 1
    res = 1
    x = x % p
    if (x == 0) :
        return 0
    while (y > 0) :
        if ((y & 1) == 1) :
            res = (res * x) % p
        y = y >> 1
        x = (x * x) % p
    return res

## DISJOINT SET UNINON FUNCTIONS
def swap(a,b):
    temp = a
    a = b
    b = temp
    return a,b;

# find function with path compression included (recursive)
# def find(x, link):
#     if link[x] == x:
#         return x
#     link[x] = find(link[x], link);
#     return link[x];

# find function with path compression (ITERATIVE)
def find(x, link):
    p = x;
    while( p != link[p]):
        p = link[p];

    while( x != p):
        nex = link[x];
        link[x] = p;
        x = nex;
    return p;

# the union function which makes union(x,y)
# of two nodes x and y
def union(x, y, link, size):
    x = find(x, link)
    y = find(y, link)
    if size[x] < size[y]:
        x,y = swap(x,y)
    if x != y:
        size[x] += size[y]
        link[y] = x

## returns an array of boolean if primes or not USING SIEVE OF ERATOSTHANES
def sieve(n):
    prime = [True for i in range(n+1)]
    prime[0], prime[1] = False, False
    p = 2
    while (p * p <= n):
        if (prime[p] == True):
            for i in range(p * p, n+1, p):
                prime[i] = False
        p += 1
    return prime

# Euler's Toitent Function phi
def phi(n) :

    result = n
    p = 2
    while(p * p<= n) :
        if (n % p == 0) :
            while (n % p == 0) :
                n = n // p
            result = result * (1.0 - (1.0 / (float) (p)))
        p = p + 1
    if (n > 1) :
        result = result * (1.0 - (1.0 / (float)(n)))

    return (int)(result)

def is_prime(n):
	if n == 0:
		return False
	if n == 1:
		return True
	for i in range(2, int(n ** (1 / 2)) + 1):
		if not n % i:
			return False

	return True

def next_prime(n, primes):
	while primes[n] != True:
		n += 1
	return n

#### PRIME FACTORIZATION IN O(log n) using Sieve ####
MAXN = int(1e5 + 5)
def spf_sieve():
    spf[1] = 1;
    for i in range(2, MAXN):
        spf[i] = i;
    for i in range(4, MAXN, 2):
        spf[i] = 2;
    for i in range(3, ceil(MAXN ** 0.5), 2):
        if spf[i] == i:
            for j in range(i*i, MAXN, i):
                if spf[j] == j:
                    spf[j] = i;
    ## function for storing smallest prime factors (spf) in the array

################## un-comment below 2 lines when using factorization #################
spf = [0 for i in range(MAXN)]
# spf_sieve();
def factoriazation(x):
    res = []
    for i in range(2, int(x ** 0.5) + 1):
    	while x % i == 0:
    		res.append(i)
    		x //= i
    if x != 1:
   		res.append(x)
    return res
    ## this function is useful for multiple queries only, o/w use
    ## primefs function above. complexity O(log n)

def factors(n):
	res = []
	for i in range(1, int(n ** 0.5) + 1):
		if n % i == 0:
			res.append(i)
			res.append(n // i)
	return list(set(res))

## taking integer array input
def int_array():
    return list(map(int, input().strip().split()));

def float_array():
    return list(map(float, input().strip().split()));

## taking string array input
def str_array():
    return input().strip().split();

def binary_search(low, high, w, h, n):
	while low < high:
		mid = low + (high - low) // 2
		# print(low, mid, high)
		if check(mid, w, h, n):
			low = mid + 1
		else:
			high = mid
	return low

## for checking any conditions
def check(val, pair):
    summ = 0
    for x in pair:
        if x[1] > val:
            summ += x[0]
    return summ > val

## for sorting according to second position
def sortSecond(val):
	return val[1]

#defining a couple constants
MOD = int(1e9)+7;
CMOD = 998244353;
INF = float('inf'); NINF = -float('inf');
alphs = "abcdefghijklmnopqrstuvwxyz"

################### ---------------- TEMPLATE ENDS HERE ---------------- ###################

from itertools import permutations
import math
import bisect as bis
import random
import sys
import collections as collect
import functools as fnt
from decimal import Decimal
# from sys import stdout
# import numpy as np
"""
_______________
rough work here
_______________

n piranhas with sizes a1, a2, .... an
scientist of berland state univ
want to find if there is dominant piranha
the piranha is dominant if
it can eat all the other
piranhas in the aquarium
piranha can eat only one of the adjacent piranhas during one move
piranha can do as many moves as it needs
piranha i can eat i - 1

"""

def solve():
    n = scanner()
    b = get_list()
    a = []
    vis = [0] * (2 * n)
    mp = {}
    for x in b:
        mp[x] = 1
        if x > 2 * n:
            print(-1)
            return
        vis[x - 1] =  1
    for x in b:
        a.append(x)
        mp[x] = 1
        for i in range(1, 201):
            if i > x and mp.get(i) == None:
                a.append(i)
                if i > 2 * n:
                    print(-1)
                    return
                vis[i - 1] = 1
                mp[i] = 1
                break
    if sum(vis) == 2 * n:
        print(*a)
    else:
        print(-1)

# region fastio
# template taken from https://github.com/cheran-senthil/PyRival/blob/master/templates/template.py

BUFSIZE = 8192

class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)

class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")

def print(*args, **kwargs):
    """Prints the values to a stream, or to sys.stdout by default."""
    sep, file = kwargs.pop("sep", " "), kwargs.pop("file", sys.stdout)
    at_start = True
    for x in args:
        if not at_start:
            file.write(sep)
        file.write(str(x))
        at_start = False
    file.write(kwargs.pop("end", "\n"))
    if kwargs.pop("flush", False):
        file.flush()

if sys.version_info[0] < 3:
    sys.stdin, sys.stdout = FastIO(sys.stdin), FastIO(sys.stdout)
else:
    sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)

input = lambda: sys.stdin.readline().rstrip("\r\n")

# endregion

if __name__ == "__main__":
    #read()
    # sys.stdin = open("input.txt", "r")
    # sys.stdout = open("output.txt", "w")
    t = scanner()
    for i in range(t):
    	solve()
    #dmain()

# Comment Read()
	# fin_time = datetime.now()
# 	print("Execution time (for loop): ", (fin_time-init_time))


##############--->>>>> Deepcoder Amit Kumar Bhuyan <<<<<---##############

"""
 Perfection is achieved not when there is nothing more to add, but rather when there is nothing more to take away.
"""
from __future__ import division, print_function

import os,sys
from io import BytesIO, IOBase

if sys.version_info[0] < 3:
    from __builtin__ import xrange as range
    from future_builtins import ascii, filter, hex, map, oct, zip

def ii():  return int(input())
def si():  return input()
def mi():  return map(int,input().strip().split(" "))
def msi(): return map(str,input().strip().split(" "))
def li():  return list(mi())

def dmain():
    sys.setrecursionlimit(1000000)
    threading.stack_size(1024000)
    thread = threading.Thread(target=main)
    thread.start()

#from collections import deque, Counter, OrderedDict,defaultdict
#from heapq import nsmallest, nlargest, heapify,heappop ,heappush, heapreplace
#from math import log,sqrt,factorial,cos,tan,sin,radians
#from bisect import bisect,bisect_left,bisect_right,insort,insort_left,insort_right
#from decimal import *
#import threading
#from itertools import permutations
#Copy 2D list  m = [x[:] for x in mark] .. Avoid Using Deepcopy
import sys
input = sys.stdin.readline
scanner = lambda: int(input())
string = lambda: input().rstrip()
get_list = lambda: list(read())
read = lambda: map(int, input().split())
get_float = lambda: map(float, input().split())
# from bisect import bisect_left as lower_bound;
# from bisect import bisect_right as upper_bound;
# from math import ceil, factorial;

def ceil(x):
    if x != int(x):
        x = int(x) + 1
    return x

def factorial(x, m):
	val = 1
	while x>0:
		val = (val * x) % m
		x -= 1
	return val

def fact(x):
	val = 1
	while x > 0:
		val *= x
		x -= 1
	return val

# swap_array function
def swaparr(arr, a,b):
    temp = arr[a];
    arr[a] = arr[b];
    arr[b] = temp;

## gcd function
def gcd(a,b):
    if b == 0:
        return a;
    return gcd(b, a % b);

## lcm function
def lcm(a, b):
	return (a * b) // math.gcd(a, b)

def is_integer(n):
	return math.ceil(n) == math.floor(n)

## nCr function efficient using Binomial Cofficient
def nCr(n, k):
	if k > n:
		return 0
	if(k > n - k):
		k = n - k
	res = 1
	for i in range(k):
		res = res * (n - i)
		res = res / (i + 1)
	return int(res)

## upper bound function code -- such that e in a[:i] e < x;

## prime factorization
def primefs(n):
    ## if n == 1    ## calculating primes
    primes = {}
    while(n%2 == 0 and n > 0):
        primes[2] = primes.get(2, 0) + 1
        n = n//2
    for i in range(3, int(n**0.5)+2, 2):
        while(n%i == 0 and n > 0):
            primes[i] = primes.get(i, 0) + 1
            n = n//i
    if n > 2:
        primes[n] = primes.get(n, 0) + 1
    ## prime factoriazation of n is stored in dictionary
    ## primes and can be accesed. O(sqrt n)
    return primes

## MODULAR EXPONENTIATION FUNCTION
def power(x, y, p):
    if y == 0:
        return 1
    res = 1
    x = x % p
    if (x == 0) :
        return 0
    while (y > 0) :
        if ((y & 1) == 1) :
            res = (res * x) % p
        y = y >> 1
        x = (x * x) % p
    return res

## DISJOINT SET UNINON FUNCTIONS
def swap(a,b):
    temp = a
    a = b
    b = temp
    return a,b;

# find function with path compression included (recursive)
# def find(x, link):
#     if link[x] == x:
#         return x
#     link[x] = find(link[x], link);
#     return link[x];

# find function with path compression (ITERATIVE)
def find(x, link):
    p = x;
    while( p != link[p]):
        p = link[p];

    while( x != p):
        nex = link[x];
        link[x] = p;
        x = nex;
    return p;

# the union function which makes union(x,y)
# of two nodes x and y
def union(x, y, link, size):
    x = find(x, link)
    y = find(y, link)
    if size[x] < size[y]:
        x,y = swap(x,y)
    if x != y:
        size[x] += size[y]
        link[y] = x

## returns an array of boolean if primes or not USING SIEVE OF ERATOSTHANES
def sieve(n):
    prime = [True for i in range(n+1)]
    prime[0], prime[1] = False, False
    p = 2
    while (p * p <= n):
        if (prime[p] == True):
            for i in range(p * p, n+1, p):
                prime[i] = False
        p += 1
    return prime

# Euler's Toitent Function phi
def phi(n) :

    result = n
    p = 2
    while(p * p<= n) :
        if (n % p == 0) :
            while (n % p == 0) :
                n = n // p
            result = result * (1.0 - (1.0 / (float) (p)))
        p = p + 1
    if (n > 1) :
        result = result * (1.0 - (1.0 / (float)(n)))

    return (int)(result)

def is_prime(n):
	if n == 0:
		return False
	if n == 1:
		return True
	for i in range(2, int(n ** (1 / 2)) + 1):
		if not n % i:
			return False

	return True

def next_prime(n, primes):
	while primes[n] != True:
		n += 1
	return n

#### PRIME FACTORIZATION IN O(log n) using Sieve ####
MAXN = int(1e5 + 5)
def spf_sieve():
    spf[1] = 1;
    for i in range(2, MAXN):
        spf[i] = i;
    for i in range(4, MAXN, 2):
        spf[i] = 2;
    for i in range(3, ceil(MAXN ** 0.5), 2):
        if spf[i] == i:
            for j in range(i*i, MAXN, i):
                if spf[j] == j:
                    spf[j] = i;
    ## function for storing smallest prime factors (spf) in the array

################## un-comment below 2 lines when using factorization #################
spf = [0 for i in range(MAXN)]
# spf_sieve();
def factoriazation(x):
    res = []
    for i in range(2, int(x ** 0.5) + 1):
    	while x % i == 0:
    		res.append(i)
    		x //= i
    if x != 1:
   		res.append(x)
    return res
    ## this function is useful for multiple queries only, o/w use
    ## primefs function above. complexity O(log n)

def factors(n):
	res = []
	for i in range(1, int(n ** 0.5) + 1):
		if n % i == 0:
			res.append(i)
			res.append(n // i)
	return list(set(res))

## taking integer array input
def int_array():
    return list(map(int, input().strip().split()));

def float_array():
    return list(map(float, input().strip().split()));

## taking string array input
def str_array():
    return input().strip().split();

def binary_search(low, high, w, h, n):
	while low < high:
		mid = low + (high - low) // 2
		# print(low, mid, high)
		if check(mid, w, h, n):
			low = mid + 1
		else:
			high = mid
	return low

## for checking any conditions
def check(val, pair):
    summ = 0
    for x in pair:
        if x[1] > val:
            summ += x[0]
    return summ > val

## for sorting according to second position
def sortSecond(val):
	return val[1]

#defining a couple constants
MOD = int(1e9)+7;
CMOD = 998244353;
INF = float('inf'); NINF = -float('inf');
alphs = "abcdefghijklmnopqrstuvwxyz"

################### ---------------- TEMPLATE ENDS HERE ---------------- ###################

from itertools import permutations
import math
import bisect as bis
import random
import sys
import collections as collect
import functools as fnt
from decimal import Decimal
# from sys import stdout
# import numpy as np
"""
_______________
rough work here
_______________

n piranhas with sizes a1, a2, .... an
scientist of berland state univ
want to find if there is dominant piranha
the piranha is dominant if
it can eat all the other
piranhas in the aquarium
piranha can eat only one of the adjacent piranhas during one move
piranha can do as many moves as it needs
piranha i can eat i - 1

"""

def solve():
    n = scanner()
    b = get_list()
    a = []
    if n % 2 == 0:
        print(-1)
        return
    mp = {}
    for x in b:
        mp[x] = 1
    for x in b:
        a.append(x)
        mp[x] = 1
        for i in range(1, 201):
            if i > x and mp.get(i) == None:
                a.append(i)
                mp[i] = 1
                break
    print(*a)

# region fastio
# template taken from https://github.com/cheran-senthil/PyRival/blob/master/templates/template.py

BUFSIZE = 8192

class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)

class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")

def print(*args, **kwargs):
    """Prints the values to a stream, or to sys.stdout by default."""
    sep, file = kwargs.pop("sep", " "), kwargs.pop("file", sys.stdout)
    at_start = True
    for x in args:
        if not at_start:
            file.write(sep)
        file.write(str(x))
        at_start = False
    file.write(kwargs.pop("end", "\n"))
    if kwargs.pop("flush", False):
        file.flush()

if sys.version_info[0] < 3:
    sys.stdin, sys.stdout = FastIO(sys.stdin), FastIO(sys.stdout)
else:
    sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)

input = lambda: sys.stdin.readline().rstrip("\r\n")

# endregion

if __name__ == "__main__":
    #read()
    # sys.stdin = open("input.txt", "r")
    # sys.stdout = open("output.txt", "w")
    t = scanner()
    for i in range(t):
    	solve()
    #dmain()

# Comment Read()
	# fin_time = datetime.now()
# 	print("Execution time (for loop): ", (fin_time-init_time))