import java.awt.List;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.Map.Entry;
import java.util.Queue;
import java.util.Scanner;
import java.util.Set;
import java.util.Stack;
import java.util.*;

public class cool {

	private static InputStream stream;
	private static PrintWriter pw;

//	static int a;
//	static int b;
//	static int f = 0;
	static int n;
	static int m;
//	static int[][] arr;
	//static char[][] arr;

	static int Arr[];
	static int tree[];

	static int time = 0;

	static int[][] dir = {{-1,0},{0,1},{1,0},{0,-1}};

	static int visited[];
	static int visited2[][];
	static Stack<Integer> stack;

//	static ArrayList<Integer> ans;

//	static int arr[][];
//	static int arr[];
	static char[][] arr;
	static char[][] ans;
//	static int[][] visited;
//  static int c;
//	static int d[];
//	static int arr[][];
	static ArrayList[] adj;
//	static ArrayList<Integer> ans;
//	static int f;
	static int parent[];
	static int color[];
//	static ArrayList<Integer> comp[];

	static int f = 0;
	static int k = 0;
	static int count = 0;
	static int ini[];

	static ArrayList<Node> list;
	static ArrayList<Integer> ind;

	public static void main(String[] args){
		//InputReader(System.in);
		pw = new PrintWriter(System.out);

		Scanner in = new Scanner(System.in);

		String s = in.nextLine();

		long a = 0;

		HashMap<Character,Long> map = new HashMap();

		for(int i = 0;i<10;i++){
			map.put((char)('0'+i),a);
			a++;
		}

		for(char i = 'A';i<='Z';i++){
			map.put(i, a);
			a++;
		}

		for(char o = 'a';o<='z';o++){
			map.put(o, a);
			a++;
		}

		map.put('-', a++);
		map.put('_', a);

		long ans = 1;

		long mod = 1000000007;

		for(int i = 0;i<s.length();i++){
			long c = map.get(s.charAt(i));

			for(int j= 0;j<6;j++){
				if((c&(1<<j)) == 0){
					ans = (ans*3)%mod;
				}
			}

		}

		pw.println(ans);

		in.close();

		pw.close();
	}

	public static void dfs(int i,int c){

		if(visited[i] == 1){
			return;
		}

		visited[i] = 1;

		for(int j = 0;j<adj[i].size();j++){

			if(color[(int)adj[i].get(j)] == c){
				dfs((int)adj[i].get(j),c);
			}else{
				count++;
			}

		}

	}

	public static long pow(long n,long p,long m){
        long  result = 1;
         if(p==0)
           return 1;
       if (p==1)
           return n;
       while(p!=0)
       {
           if(p%2==1)
               result *= n;
           if(result>=m)
           result%=m;
           p >>=1;
           n*=n;
           if(n>=m)
           n%=m;
       }
       return result;
       }

	public static int cs(ArrayList<Integer> arr, int low, int high, int x)
	{
	  int mid;

	  if(x <= arr.get(low))
	    return low;

	  if(x > arr.get(high))
	    return -1;

	  mid = (low + high)/2;

	  if(arr.get(mid) == x)
	    return mid;

	  else if(arr.get(mid) < x)
	  {
	    if(mid + 1 <= high && x <= arr.get(mid+1))
	      return mid + 1;
	    else
	      return cs(arr, mid+1, high, x);
	  }

	  else
	  {
	    if(mid - 1 >= low && x > arr.get(mid-1))
	      return mid;
	    else
	      return cs(arr, low, mid - 1, x);
	  }
	}

	public static int fs(ArrayList<Integer> arr, int low, int high, int x)
	{

	    if (low > high)
	        return -1;

	    if (x >= arr.get(high))
	        return high;

	    // Find the middle point
	    int mid = (low+high)/2;

	    // If middle point is floor.
	    if (arr.get(mid) == x)
	        return mid;

	    // If x lies between mid-1 and mid
	    if (mid > 0 && arr.get(mid-1) <= x && x < arr.get(mid))
	        return mid-1;

	    // If x is smaller than mid, floor must be in
	    // left half.
	    if (x < arr.get(mid))
	        return fs(arr, low, mid-1, x);

	    // If mid-1 is not floor and x is greater than
	    // arr[mid],
	    return fs(arr, mid+1, high, x);
	}

	public static long gcd(long x, long y) {
		if (x == 0)
			return y;
		else
			return gcd( y % x,x);
	}

//	public static void dfs(int a,int p){
//		System.out.println(a);
//		if(a > 30000){
//			return;
//		}
//
//		if(visited[a] == 1){
//			return;
//		}
//
//		visited[a] = 1;
//
//		if(ini[a] != 0){
//			count+= ini[a];
//		}
//
//		int l = a-p;
//
//		if(visited[a+l-1] == 0){
//			dfs(a+l-1,a);
//		}else if(visited[a+l] == 0){
//			dfs(a+l,a);
//		}else if(visited[a+l+1] == 0){
//			dfs(a+l+1,a);
//		}
//
//	}
//

	public static int prev(int i,boolean[] arr){

		while(arr[i]){
			if(i == 0){
				if(arr[i]){
					return -1;
				}else{
					return 0;
				}

			}

			i--;

		}

		return i;

	}

	public static int next(int i,boolean[] arr){

		while(arr[i]){
			if(i == arr.length-1){
				if(arr[i]){
					return -1;
				}else{
					return 0;
				}
			}

			i++;
		}

		return i;
	}

	private static Map<String, Integer> sortByValue(Map<String, Integer> unsortMap) {

        // 1. Convert Map to List of Map
        LinkedList<Entry<String, Integer>> list =
                new LinkedList<Map.Entry<String, Integer>>(unsortMap.entrySet());

        // 2. Sort list with Collections.sort(), provide a custom Comparator
        //    Try switch the o1 o2 position for a different order
        Collections.sort(list, new Comparator<Map.Entry<String, Integer>>() {
            public int compare(Map.Entry<String, Integer> o1,
                               Map.Entry<String, Integer> o2) {
                return (o1.getValue()).compareTo(o2.getValue());
            }
        });

        // 3. Loop the sorted list and put it into a new insertion order Map LinkedHashMap
        Map<String, Integer> sortedMap = new LinkedHashMap<String, Integer>();
        for (Map.Entry<String, Integer> entry : list) {
            sortedMap.put(entry.getKey(), entry.getValue());
        }

        /*
        //classic iterator example
        for (Iterator<Map.Entry<String, Integer>> it = list.iterator(); it.hasNext(); ) {
            Map.Entry<String, Integer> entry = it.next();
            sortedMap.put(entry.getKey(), entry.getValue());
        }*/

        return sortedMap;
    }

	public static ArrayList<Integer> Range(int[] numbers, int target) {

	    int low = 0, high = numbers.length - 1;
	    // get the start index of target number
	    int startIndex = -1;
	    while (low <= high) {
	        int mid = (high - low) / 2 + low;
	        if (numbers[mid] > target) {
	            high = mid - 1;
	        } else if (numbers[mid] == target) {
	            startIndex = mid;
	            high = mid - 1;
	        } else
	            low = mid + 1;
	    }

	    // get the end index of target number
	    int endIndex = -1;
	    low = 0;
	    high = numbers.length - 1;
	    while (low <= high) {
	        int mid = (high - low) / 2 + low;
	        if (numbers[mid] > target) {
	            high = mid - 1;
	        } else if (numbers[mid] == target) {
	            endIndex = mid;
	            low = mid + 1;
	        } else
	            low = mid + 1;
	    }

	    ArrayList<Integer> list = new ArrayList<Integer>();
	    int c = 0;
	    if (startIndex != -1 && endIndex != -1){
	        for(int i = startIndex;i<=endIndex;i++){
	        	list.add(i);
	        }
	    }

	    return list;

	}

	 private static int root(int Arr[],int i)
	    {
	        while(Arr[ i ] != i)           //chase parent of current element until it reaches root
	        {
	            Arr[ i ] = Arr[ Arr[ i ] ] ;
	            i = Arr[ i ];
	        }
	        return i;
	    }

	 private static void union(int Arr[],int size[],int A,int B)
	    {
	        int root_A = root(Arr,A);
	        int root_B = root(Arr,B);

	       System.out.println(root_A + " " + root_B);
	        if(root_A != root_B){
	        	 if(size[root_A] < size[root_B ])
	 	        {
	        		 Arr[ root_A ] = Arr[root_B];
	        		 size[root_B] += size[root_A];
	 	        }
	 	        else
	 	        {
	 	        	Arr[ root_B ] = Arr[root_A];
	 	        	size[root_A] += size[root_B];
	 	        }
	        }
	    }

	 private static boolean find(int A,int B)
	    {
	        if( root(Arr,A)==root(Arr,B) )       //if A and B have the same root, it means that they are connected.
	        return true;
	        else
	        return false;
	    }

//
//	public static void bfs(int i){
//
//		Queue<Integer> q=new LinkedList<Integer>();
//    	q.add(i);
//
//    	visited[i] = 1;
//    	c++;
//    	nodes++;
//    	while(!q.isEmpty()){
//    		int top=q.poll();
//
//    		Iterator<Integer> it= arr[top].listIterator();
//    		while(it.hasNext()){
//    			int next =it.next();
//
//    			if(visited[next] == 0){
//    				nodes++;
//    				visited[next] = 1;
//    				q.add(next);
//    			}
//
//    		}
//    	}
//
//	}

//	public static void dfs(int i){
//
//
//		if(visited[i] == 1){
//			return;
//		}
//
//		visited[i] = 1;
//		con[c].add(i);
//		//System.out.print(i + " ");
//		for(int j = 0;j<arr[i].size();j++){
//			dfs(arr[i].get(j));
//		}
//
//	}
//
//
//	public static void dfss(int i){
//		if(visited[i] == 1){
//			return;
//		}
//
//		visited[i] = 1;
//
//		for(int j = 0;j<arr[i].size();j++){
//			dfss(arr[i].get(j));
//		}
//	//	System.out.println(i);
//		stack.push(i);
//	}
//
//	public static void reverse(){
//		ArrayList[] temp = new ArrayList[n];
//
//		for(int i = 0;i<n;i++){
//			temp[i] = new ArrayList();
//		}
//
//		for(int i = 0;i<n;i++){
//			for(int j = 0;j<arr[i].size();j++){
//				temp[arr[i].get(j)].add(i);
//			}
//		}
//
//		arr = temp;
//
//	}
//
//

	public static boolean isPrime(int n) {
		// Corner cases
		if (n <= 1)
			return false;
		if (n <= 3)
			return true;

		// This is checked so that we can skip
		// middle five numbers in below loop
		if (n % 2 == 0 || n % 3 == 0)
			return false;

		for (int i = 5; i * i <= n; i = i + 6)
			if (n % i == 0 || n % (i + 2) == 0)
				return false;

		return true;
	}

	 // union code starts

	 // union code ends

//	 // Segment tree code begins
//
//
//	 static void build(int node,int start,int end)
//	 {
//	 if(start==end)
//	 tree[node]=a[start];
//	 else
//	 {
//	 int mid=(start+end)/2;
//	 build(2*node,start,mid);
//	 build(2*node+1,mid+1,end);
//	 if(tree[2*node]<tree[2*node+1])
//	 tree[node]=tree[2*node];
//	 else
//	 tree[node]=tree[2*node+1];
//	 }
//	 }
//
//
//	 static void update(int node,int start,int end,int idx,int val)
//	 {
//	 if(start==end)
//	 {
//	 a[idx]=val;
//	 tree[node]=val;
//	 }
//	 else
//	 {
//	 int mid=(start+end)/2;
//	 if(idx>=start&&idx<=mid)
//	 update(2*node,start,mid,idx,val);
//	 else
//	 update(2*node+1,mid+1,end,idx,val);
//	 if(tree[2*node]<tree[2*node+1])
//	 tree[node]=tree[2*node];
//	 else
//	 tree[node]=tree[2*node+1];
//	 }
//	 }
//
//	 static int query(int node,int start,int end,int l,int r)
//	 {
//	 if(l>end||start>r)
//	 return 100005;
//	 if(l<=start&&r>=end)
//	 return tree[node];
//	 int p1,p2;
//	 int mid=(start+end)/2;
//	 p1=query(2*node,start,mid,l,r);
//	 p2=query(2*node+1,mid+1,end,l,r);
//	 if(p1<p2)
//	 return p1;
//	 else
//	 return p2;
//	 }
//
//
//
//}

}

class Field{

	long a;
	long b;

	Field(long a,long b){
		this.a = Math.min(a, b);
		this.b = Math.max(a, b);
	}

	boolean greator(Field f){
		return (this.a >= f.a && this.b >= f.b);
	}

}

class Node{
	int a;
	int b;
}

class point{
	int a;
	int b;
}

class MyComp2 implements Comparator<Node>{

	@Override
	public int compare(Node o1, Node o2) {

		if( o1.b > o2.b){
			return 1;
		}else if( o1.b < o2.b){
			return -1;
		}else{
			if(o1.a == o2.a){
				return 0;
			}else if(o1.a > o2.a){
				return 1;
			}else if(o1.a < o2.a){
				return -1;
			}
		}

		return 0;
	}
}

class Card implements Comparable<Card>
{
	int a,b;
	public Card(int w,int h)
	{
		this.a=w;
		this.b=h;

	}
	public int compareTo(Card that)
	{
		return this.a-that.a;
	}
}


import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.math.BigInteger;
import java.util.Hashtable;
import java.util.StringTokenizer;

public class Main {
	static Hashtable<Character, Integer> ht;
	public static int numbers(char c){
		int sum=1;
		for (int i=0;i<64;i++){
			for (int j=0;j<64;j++){
			if ((i&j)==ht.get(c) && i!=j) sum+=1;}
		}

		return sum;

	}
	public static void main(String[] args) throws IOException {
		Scanner s = new Scanner(System.in);
		String string = s.next();
		ht = new Hashtable<>();
		for (int i=0;i<10;i++){
			ht.put((i+"").charAt(0),i);
		} char c= 'A';
		for (int i=10;i<=35;i++){
			ht.put(c,i);
			c++;
		} c='a';
		for (int i=36;i<=61;i++){
			ht.put(c,i);
			c++;
		}
		ht.put('-',62); ht.put('_',63);
		BigInteger bi = new BigInteger("1");

		for (int i=0;i<string.length();i++){
			bi = bi.multiply(new BigInteger(numbers(string.charAt(i))+""));
		}
		bi = bi.mod(new BigInteger("1000000007"));
		System.out.println(bi);
	}
}

class Scanner {
    StringTokenizer st;
    BufferedReader br;

    public Scanner(InputStream s) {
        br = new BufferedReader(new InputStreamReader(s));
    }

    public Scanner(FileReader r) {
        br = new BufferedReader(r);
    }

    public String next() throws IOException {
        while (st == null || !st.hasMoreTokens())
            st = new StringTokenizer(br.readLine());
        return st.nextToken();
    }

    public int nextInt() throws IOException {
        return Integer.parseInt(next());
    }

    public long nextLong() throws IOException {
        return Long.parseLong(next());
    }

    public String nextLine() throws IOException {
        return br.readLine();
    }

    public double nextDouble() throws IOException {
        String x = next();
        StringBuilder sb = new StringBuilder("0");
        double res = 0, f = 1;
        boolean dec = false, neg = false;
        int start = 0;
        if (x.charAt(0) == '-') {
            neg = true;
            start++;
        }
        for (int i = start; i < x.length(); i++)
            if (x.charAt(i) == '.') {
                res = Long.parseLong(sb.toString());
                sb = new StringBuilder("0");
                dec = true;
            } else {
                sb.append(x.charAt(i));
                if (dec)
                    f *= 10;
            }
        res += Long.parseLong(sb.toString()) / f;
        return res * (neg ? -1 : 1);
    }

    public boolean ready() throws IOException {
        return br.ready();
    }

}


import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.Hashtable;
import java.util.StringTokenizer;

public class Main {
	static Hashtable<Character, Integer> ht;
	static int [] calculated = new int [64];
	public static int numbers(char c){
		if (calculated[ht.get(c)]!=0)
			return calculated[ht.get(c)];
		int sum=1;
		for (int i=0;i<64;i++){
			for (int j=0;j<64;j++){
			if ((i&j)==ht.get(c) && i!=j) sum+=1;}
		}
		calculated[ht.get(c)]= sum;
		return sum;

	}
	public static void main(String[] args) throws IOException {
		Scanner s = new Scanner(System.in);
		String string = s.next();
		ht = new Hashtable<>();
		for (int i=0;i<10;i++){
			ht.put((i+"").charAt(0),i);
		} char c= 'A';
		for (int i=10;i<=35;i++){
			ht.put(c,i);
			c++;
		} c='a';
		for (int i=36;i<=61;i++){
			ht.put(c,i);
			c++;
		}
		ht.put('-',62); ht.put('_',63);
		long bi = 1;

		for (int i=0;i<string.length();i++){
			bi = ((bi%1000000007)*(numbers(string.charAt(i))%1000000007))%1000000007;
		}
		System.out.println(bi);
	}
}

class Scanner {
    StringTokenizer st;
    BufferedReader br;

    public Scanner(InputStream s) {
        br = new BufferedReader(new InputStreamReader(s));
    }

    public Scanner(FileReader r) {
        br = new BufferedReader(r);
    }

    public String next() throws IOException {
        while (st == null || !st.hasMoreTokens())
            st = new StringTokenizer(br.readLine());
        return st.nextToken();
    }

    public int nextInt() throws IOException {
        return Integer.parseInt(next());
    }

    public long nextLong() throws IOException {
        return Long.parseLong(next());
    }

    public String nextLine() throws IOException {
        return br.readLine();
    }

    public double nextDouble() throws IOException {
        String x = next();
        StringBuilder sb = new StringBuilder("0");
        double res = 0, f = 1;
        boolean dec = false, neg = false;
        int start = 0;
        if (x.charAt(0) == '-') {
            neg = true;
            start++;
        }
        for (int i = start; i < x.length(); i++)
            if (x.charAt(i) == '.') {
                res = Long.parseLong(sb.toString());
                sb = new StringBuilder("0");
                dec = true;
            } else {
                sb.append(x.charAt(i));
                if (dec)
                    f *= 10;
            }
        res += Long.parseLong(sb.toString()) / f;
        return res * (neg ? -1 : 1);
    }

    public boolean ready() throws IOException {
        return br.ready();
    }

}


import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.math.BigInteger;
import java.util.Hashtable;
import java.util.StringTokenizer;

public class Main {
	static Hashtable<Character, Integer> ht;
	public static int numbers(char c){
		int sum=1;
		for (int i=0;i<64;i++){
			for (int j=0;j<64;j++){
			if ((i&j)==ht.get(c) && i!=j) sum+=1;}
		}

		return sum;

	}
	public static void main(String[] args) throws IOException {
		Scanner s = new Scanner(System.in);
		String string = s.next();
		ht = new Hashtable<>();
		for (int i=0;i<9;i++){
			ht.put((i+"").charAt(0),i);
		} char c= 'A';
		for (int i=10;i<=35;i++){
			ht.put(c,i);
			c++;
		} c='a';
		for (int i=36;i<=61;i++){
			ht.put(c,i);
			c++;
		}
		ht.put('-',62); ht.put('_',63);
		BigInteger bi = new BigInteger("1");

		for (int i=0;i<string.length();i++){
			bi = bi.multiply(new BigInteger(numbers(string.charAt(i))+""));
		}
		bi = bi.mod(new BigInteger("1000000007"));
		System.out.println(bi);
	}
}

class Scanner {
    StringTokenizer st;
    BufferedReader br;

    public Scanner(InputStream s) {
        br = new BufferedReader(new InputStreamReader(s));
    }

    public Scanner(FileReader r) {
        br = new BufferedReader(r);
    }

    public String next() throws IOException {
        while (st == null || !st.hasMoreTokens())
            st = new StringTokenizer(br.readLine());
        return st.nextToken();
    }

    public int nextInt() throws IOException {
        return Integer.parseInt(next());
    }

    public long nextLong() throws IOException {
        return Long.parseLong(next());
    }

    public String nextLine() throws IOException {
        return br.readLine();
    }

    public double nextDouble() throws IOException {
        String x = next();
        StringBuilder sb = new StringBuilder("0");
        double res = 0, f = 1;
        boolean dec = false, neg = false;
        int start = 0;
        if (x.charAt(0) == '-') {
            neg = true;
            start++;
        }
        for (int i = start; i < x.length(); i++)
            if (x.charAt(i) == '.') {
                res = Long.parseLong(sb.toString());
                sb = new StringBuilder("0");
                dec = true;
            } else {
                sb.append(x.charAt(i));
                if (dec)
                    f *= 10;
            }
        res += Long.parseLong(sb.toString()) / f;
        return res * (neg ? -1 : 1);
    }

    public boolean ready() throws IOException {
        return br.ready();
    }

}


import java.io.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.InputMismatchException;

public class Cf0106C {
    private static InputReader in = new InputReader(System.in);
    private static OutputWriter out = new OutputWriter(System.out);

    private static void solve() throws Exception{
        int[] pre = new int[64];
        Arrays.fill(pre,1);
        for(int i=0; i<64; ++i){
            int temp = i;
            for(int j=0; j<6; ++j){
                if((temp&1)==0){
                    pre[i] *= 3;
                }
                temp >>=1;
            }
        }

        String s = in.readString();
        long mod = 1000000007;
        long answer = 1;
        for(int i=0; i<s.length(); ++i){
            char c = s.charAt(i);
            int ch;
            if(c>=48&&c<=57){
                ch = c-48;
            }
            else if(c>=65&&c<=90){
                ch = c-55;
            }
            else if(c>=97&&c<=122){
                ch = c-61;
            }
            else if(c==45){
                ch = 62;
            }
            else {
                ch = 63;
            }
            answer = (answer*pre[ch])%mod;
        }
        out.println(answer);
    }

    public static void main(String[] args) throws Exception {
        solve();
        out.close();
    }

    private static class InputReader {
        private InputStream stream;
        private byte[] buffer;
        private int currentIndex;
        private int bytesRead;

        public InputReader(InputStream stream) {
            this.stream = stream;
            buffer = new byte[131072];
        }

        public InputReader(InputStream stream, int bufferSize) {
            this.stream = stream;
            buffer = new byte[bufferSize];
        }

        private int read() throws IOException {
            if (currentIndex >= bytesRead) {
                currentIndex = 0;
                bytesRead = stream.read(buffer);
                if (bytesRead <= 0) {
                    return -1;
                }
            }
            return buffer[currentIndex++];
        }

        public String readString() throws IOException {
            int c = read();
            while (!isPrintable(c)) {
                c = read();
            }
            StringBuilder result = new StringBuilder();
            do {
                result.appendCodePoint(c);
                c = read();
            } while (isPrintable(c));
            return result.toString();
        }

        public int readInt() throws Exception {
            int c = read();
            int sign = 1;
            while (!isPrintable(c)) {
                c = read();
            }
            if (c == '-') {
                sign = -1;
                c = read();
            }
            int result = 0;
            do {
                if ((c < '0') || (c > '9')) {
                    throw new InputMismatchException();
                }
                result *= 10;
                result += (c - '0');
                c = read();
            } while (isPrintable(c));
            return sign * result;
        }

        public long readLong() throws Exception {
            int c = read();
            int sign = 1;
            while (!isPrintable(c)) {
                c = read();
            }
            if (c == '-') {
                sign = -1;
                c = read();
            }
            long result = 0;
            do {
                if ((c < '0') || (c > '9')) {
                    throw new InputMismatchException();
                }
                result *= 10;
                result += (c - '0');
                c = read();
            } while (isPrintable(c));
            return sign * result;
        }

        public double readDouble() throws Exception {
            int c = read();
            int sign = 1;
            while (!isPrintable(c)) {
                c = read();
            }
            if (c == '-') {
                sign = -1;
                c = read();
            }
            boolean fraction = false;
            double multiplier = 1;
            double result = 0;
            do {
                if ((c == 'e') || (c == 'E')) {
                    return sign * result * Math.pow(10, readInt());
                }
                if ((c < '0') || (c > '9')) {
                    if ((c == '.') && (!fraction)) {
                        fraction = true;
                        c = read();
                        continue;
                    }
                    throw new InputMismatchException();
                }
                if (fraction) {
                    multiplier /= 10;
                    result += (c - '0') * multiplier;
                    c = read();
                } else {
                    result *= 10;
                    result += (c - '0');
                    c = read();
                }
            } while (isPrintable(c));
            return sign * result;
        }

        private boolean isPrintable(int c) {
            return ((c > 32) && (c < 127));
        }
    }

    private static class OutputWriter {
        private PrintWriter writer;

        public OutputWriter(OutputStream outputStream) {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer) {
            this.writer = new PrintWriter(writer);
        }

        public void print(Object... objects) {
            for (int i = 0; i < objects.length; i++) {
                if (i != 0) {
                    writer.print(' ');
                }
                writer.print(objects[i]);
            }
        }

        public void println(Object... objects) {
            print(objects);
            writer.println();
        }

        public void close() {
            writer.close();
        }

        public void flush() {
            writer.flush();
        }
    }
}


import java.io.*;
import java.util.Arrays;
import java.util.InputMismatchException;

public class Cf0106C {
    private static InputReader in = new InputReader(System.in);
    private static OutputWriter out = new OutputWriter(System.out);

    private static void solve() throws Exception{
        int[] pre = new int[64];

        for(int i=0; i<64; ++i){
            for(int j=0; j<64; ++j){
               pre[i&j]++;
            }
        }

        String s = in.readString();
        long mod = 1000000007;
        long answer = 1;
        for(int i=0; i<s.length(); ++i){
            char c = s.charAt(i);
            int ch;
            if(c>=48&&c<=57){
                ch = c-48;
            }
            else if(c>=65&&c<=90){
                ch = c-55;
            }
            else if(c>=97&&c<=122){
                ch = c-61;
            }
            else if(c==45){
                ch = 62;
            }
            else {
                ch = 63;
            }
            answer = (answer*pre[ch])%mod;
        }
        out.println(answer);
    }

    public static void main(String[] args) throws Exception {
        solve();
        out.close();
    }

    private static class InputReader {
        private InputStream stream;
        private byte[] buffer;
        private int currentIndex;
        private int bytesRead;

        public InputReader(InputStream stream) {
            this.stream = stream;
            buffer = new byte[131072];
        }

        public InputReader(InputStream stream, int bufferSize) {
            this.stream = stream;
            buffer = new byte[bufferSize];
        }

        private int read() throws IOException {
            if (currentIndex >= bytesRead) {
                currentIndex = 0;
                bytesRead = stream.read(buffer);
                if (bytesRead <= 0) {
                    return -1;
                }
            }
            return buffer[currentIndex++];
        }

        public String readString() throws IOException {
            int c = read();
            while (!isPrintable(c)) {
                c = read();
            }
            StringBuilder result = new StringBuilder();
            do {
                result.appendCodePoint(c);
                c = read();
            } while (isPrintable(c));
            return result.toString();
        }

        public int readInt() throws Exception {
            int c = read();
            int sign = 1;
            while (!isPrintable(c)) {
                c = read();
            }
            if (c == '-') {
                sign = -1;
                c = read();
            }
            int result = 0;
            do {
                if ((c < '0') || (c > '9')) {
                    throw new InputMismatchException();
                }
                result *= 10;
                result += (c - '0');
                c = read();
            } while (isPrintable(c));
            return sign * result;
        }

        public long readLong() throws Exception {
            int c = read();
            int sign = 1;
            while (!isPrintable(c)) {
                c = read();
            }
            if (c == '-') {
                sign = -1;
                c = read();
            }
            long result = 0;
            do {
                if ((c < '0') || (c > '9')) {
                    throw new InputMismatchException();
                }
                result *= 10;
                result += (c - '0');
                c = read();
            } while (isPrintable(c));
            return sign * result;
        }

        public double readDouble() throws Exception {
            int c = read();
            int sign = 1;
            while (!isPrintable(c)) {
                c = read();
            }
            if (c == '-') {
                sign = -1;
                c = read();
            }
            boolean fraction = false;
            double multiplier = 1;
            double result = 0;
            do {
                if ((c == 'e') || (c == 'E')) {
                    return sign * result * Math.pow(10, readInt());
                }
                if ((c < '0') || (c > '9')) {
                    if ((c == '.') && (!fraction)) {
                        fraction = true;
                        c = read();
                        continue;
                    }
                    throw new InputMismatchException();
                }
                if (fraction) {
                    multiplier /= 10;
                    result += (c - '0') * multiplier;
                    c = read();
                } else {
                    result *= 10;
                    result += (c - '0');
                    c = read();
                }
            } while (isPrintable(c));
            return sign * result;
        }

        private boolean isPrintable(int c) {
            return ((c > 32) && (c < 127));
        }
    }

    private static class OutputWriter {
        private PrintWriter writer;

        public OutputWriter(OutputStream outputStream) {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer) {
            this.writer = new PrintWriter(writer);
        }

        public void print(Object... objects) {
            for (int i = 0; i < objects.length; i++) {
                if (i != 0) {
                    writer.print(' ');
                }
                writer.print(objects[i]);
            }
        }

        public void println(Object... objects) {
            print(objects);
            writer.println();
        }

        public void close() {
            writer.close();
        }

        public void flush() {
            writer.flush();
        }
    }
}


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

public class Label {

	public static void main(String[] args) throws java.lang.Exception {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskA solver = new TaskA();
		solver.solve(in, out);
		out.close();
	}
}

class TaskA {
	static final int mod = (int)(1e9+7);

	int getId(char c) {
		if (Character.isDigit(c))
			return c - '0';
		if (Character.isUpperCase(c))
			return c - 'A' + 10;
		if (Character.isLowerCase(c))
			return c - 'a' + 36;
		if (c == '-')
			return 62;
		return 63;
	}

	int getBits(int x) {
		int ret = 0;

		while (x > 0) {
			ret += x & 1;
			x >>= 1;
		}

		return ret;
	}

	long Pow(long base, long n) {
		long ret = 1;

		while (n > 0) {
			if ((n & 1) > 0)
				ret = ret * base % mod;
			base = base * base % mod;
			n >>= 1;
		}

		return ret;
	}

	long Inv(long x) {
		return Pow(x, mod-2);
	}

	public void solve(InputReader in, PrintWriter out) {
		String s = in.next();
		int[] bits = new int[64];

		for (int i=0; i<64; ++i)
			bits[i] = 6 - getBits(i);

		int len = s.length(), id, n = 0;
		for (int i=0; i<len; ++i) {
			id = getId(s.charAt(i));
			n += bits[id];
		}
		// out.println("n = " + n);

		long a2 = Pow(2, n), inv2 = Inv(2);
		long pre = 1, ans = 0;

		for (int i=0; i<=n; ++i) {
			ans += pre * a2 % mod;
			ans %= mod;
			// out.println("pre = " + pre + ", a2 = " + a2);
			a2 = a2 * inv2 % mod;
			pre = pre * (n-i) * Inv(i+1) % mod;
		}

		out.println(ans);
	}
}

class InputReader {
	public BufferedReader reader;
	public StringTokenizer tokenizer;

	public InputReader(InputStream stream) {
		reader = new BufferedReader(new InputStreamReader(stream), 32768);
		tokenizer = null;
	}

	public String next() {
		while (tokenizer==null || !tokenizer.hasMoreTokens()) {
			try {
				tokenizer = new StringTokenizer(reader.readLine());
			} catch (IOException e) {
				throw new RuntimeException(e);
			}
		}
		return tokenizer.nextToken();
	}

	public int nextInt() {
		return Integer.parseInt(next());
	}

	public long nextLong() {
		return Long.parseLong(next());
	}

	public double nextDouble() {
		return Double.parseDouble(next());
	}
}


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

public class Label {

	public static void main(String[] args) throws java.lang.Exception {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskA solver = new TaskA();
		solver.solve(in, out);
		out.close();
	}
}

class TaskA {
	static final int mod = (int)(1e9+7);

	int getId(char c) {
		if (Character.isDigit(c))
			return c - '0';
		if (Character.isUpperCase(c))
			return c - 'A' + 10;
		if (Character.isLowerCase(c))
			return c - 'a' + 36;
		if (c == '-')
			return 62;
		return 63;
	}

	int getBits(int x) {
		int ret = 0;

		while (x > 0) {
			ret += x & 1;
			x >>= 1;
		}

		return ret;
	}

	long Pow(long base, long n) {
		long ret = 1;

		while (n > 0) {
			if ((n & 1) > 0)
				ret = ret * base % mod;
			base = base * base % mod;
			n >>= 1;
		}

		return ret;
	}

	long Inv(long x) {
		return Pow(x, mod-2);
	}

	public void solve(InputReader in, PrintWriter out) {
		String s = in.next();
		int[] bits = new int[64];

		for (int i=0; i<64; ++i)
			bits[i] = 6 - getBits(i);

		int len = s.length(), id, n = 0;
		for (int i=0; i<len; ++i) {
			id = getId(s.charAt(i));
			n += bits[id];
		}
		// out.println("n = " + n);

		long a2 = Pow(2, n), inv2 = Inv(2);
		long pre = 1, ans = 0;

		for (int i=0; i<=n; ++i) {
			ans += pre * a2 % mod;
			ans %= mod;
			// out.println("pre = " + pre + ", a2 = " + a2);
			a2 = a2 * inv2 % mod;
			pre = pre * (n-i) % mod * Inv(i+1) % mod;
		}

		// long ans = Pow(3, n);
		out.println(ans);
	}
}

class InputReader {
	public BufferedReader reader;
	public StringTokenizer tokenizer;

	public InputReader(InputStream stream) {
		reader = new BufferedReader(new InputStreamReader(stream), 32768);
		tokenizer = null;
	}

	public String next() {
		while (tokenizer==null || !tokenizer.hasMoreTokens()) {
			try {
				tokenizer = new StringTokenizer(reader.readLine());
			} catch (IOException e) {
				throw new RuntimeException(e);
			}
		}
		return tokenizer.nextToken();
	}

	public int nextInt() {
		return Integer.parseInt(next());
	}

	public long nextLong() {
		return Long.parseLong(next());
	}

	public double nextDouble() {
		return Double.parseDouble(next());
	}
}


import java.io.*;
import java.math.BigInteger;
import java.util.*;
import static java.lang.Math.*;

public class Main {
    BufferedReader in;
    PrintWriter out;

    Main() {
        try {
            in = new BufferedReader(new FileReader("input.txt"));
            out = new PrintWriter(new FileWriter("output.txt"), true);
            solve();
        } catch (Exception ex) {
            ex.printStackTrace();
            in = new BufferedReader(new InputStreamReader(System.in));
            out = new PrintWriter(System.out, true);
            solve();
        } finally {
            try {
                in.close();
            } catch (IOException ex) {
                ex.printStackTrace();
            }
            out.close();
        }
    }

    StringTokenizer st;

    public String nextToken() {
        while (st == null || !st.hasMoreTokens())
            try {
                st = new StringTokenizer(in.readLine());
            } catch (IOException ex) {
                ex.printStackTrace();
            }
        return st.nextToken();
    }

    public Long nextLong() {
        return Long.valueOf(nextToken());
    }

    public int nextInt() {
        return Integer.valueOf(nextToken());
    }

    void solve() {
        String s = nextToken();
        Map<Character, Integer> map = new HashMap<>();
        final int MOD = (int) 1e9 + 7;
        for (int i = 0; i < 10; i++) {
            map.put((char)(i+'0'), i);
        }
        for (int i = 0; i < 26; i++) {
            map.put((char)(i+'A'), i+10);
        }
        for (int i = 0; i < 26; i++) {
            map.put((char)(i+'a'), i+36);
        }
        map.put('-', 62);
        map.put('_', 63);
        int[] bs = new int[64];
        for (int i = 0; i < 64; i++) {
            for (int j = 0; j < 64; j++) {
                bs[i&j]++;
            }
        }
        long sm = 1;
        for (int i = 0; i < s.length(); i++) {
            sm = (sm * bs[map.get(s.charAt(i))]) % MOD;
        }
        out.print(sm);
    }

    public static void main(String[] args) {
        new Main();
    }
}


import java.io.*;
import java.math.BigInteger;
import java.util.*;
import static java.lang.Math.*;

public class Main {
    BufferedReader in;
    PrintWriter out;

    Main() {
        try {
            in = new BufferedReader(new FileReader("input.txt"));
            out = new PrintWriter(new FileWriter("output.txt"), true);
            solve();
        } catch (Exception ex) {
            ex.printStackTrace();
            in = new BufferedReader(new InputStreamReader(System.in));
            out = new PrintWriter(System.out, true);
            solve();
        } finally {
            try {
                in.close();
            } catch (IOException ex) {
                ex.printStackTrace();
            }
            out.close();
        }
    }

    StringTokenizer st;

    public String nextToken() {
        while (st == null || !st.hasMoreTokens())
            try {
                st = new StringTokenizer(in.readLine());
            } catch (IOException ex) {
                ex.printStackTrace();
            }
        return st.nextToken();
    }

    public Long nextLong() {
        return Long.valueOf(nextToken());
    }

    public int nextInt() {
        return Integer.valueOf(nextToken());
    }

    void solve() {
        String s = nextToken();
        Map<Character, Integer> map = new HashMap<>();
        final int MOD = (int) 1e9 + 7;
        for (int i = 0; i < 9; i++) {
            map.put((char)(i+'0'), i);
        }
        for (int i = 0; i < 26; i++) {
            map.put((char)(i+'A'), i+10);
        }
        for (int i = 0; i < 26; i++) {
            map.put((char)(i+'a'), i+36);
        }
        map.put('-', 62);
        map.put('_', 63);
        int[] bs = new int[64*64];
        for (int i = 0; i < 64; i++) {
            for (int j = 0; j < 64; j++) {
                bs[i&j]++;
            }
        }
        long sm = 1;
        for (int i = 0; i < s.length(); i++) {
            sm = (sm * bs[map.get(s.charAt(i))]) % MOD;
        }
        out.print(sm);
    }

    public static void main(String[] args) {
        new Main();
    }
}


import java.io.*;
import java.util.HashMap;
import java.util.StringTokenizer;

/**
 * Created by aa on 1/06/2016.
 */
public class C {
    static class Pair
    {
        char c ; int num;
        Pair(char x , int n)
        {
            c = x;
            num = n;
        }
    }
    public static void main(String [] args) throws  Exception
    {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
        StringBuilder sb = new StringBuilder();
        HashMap<Character , Integer> getN = new HashMap<Character, Integer>();
        for(int i = 0 ; i < 10 ; ++i)
        {
            getN.put((char)(i+'0') , i);
        }

        for(int i = 10  ; i<=35 ; ++i)
            getN.put((char)((i-10)+'A') , i);

        for(int i = 36 ; i <=  61 ; ++i)
            getN.put((char)((i-36)+'a') , i);

        getN.put('-'  ,62);getN.put('_'  ,63);
        int cnt [] = new int[64];
        for(int i = 0 ; i < 64  ; ++i) {
            for (int j = 0; j < 64; ++j)
            {
                cnt[(i&j)]++;
            }

        }
        char []  inp= sc.next().toCharArray();
        long ans = 1;
        long mod = 1000000007;
        for(int i = 0 ; i < inp.length ; ++i)
        {
            ans*=cnt[(getN.get(inp[i]))];
            ans = ans%mod;
        }
        System.out.println(ans);
    }
    static class Scanner
    {
        StringTokenizer st;
        BufferedReader br;

        public Scanner(InputStream s){	br = new BufferedReader(new InputStreamReader(s));}

        public String next() throws IOException
        {
            while (st == null || !st.hasMoreTokens())
                st = new StringTokenizer(br.readLine());
            return st.nextToken();
        }

        public int nextInt() throws IOException {return Integer.parseInt(next());}

        public long nextLong() throws IOException {return Long.parseLong(next());}

        public String nextLine() throws IOException {return br.readLine();}

        public double nextDouble() throws IOException
        {
            String x = next();
            StringBuilder sb = new StringBuilder("0");
            double res = 0, f = 1;
            boolean dec = false, neg = false;
            int start = 0;
            if(x.charAt(0) == '-')
            {
                neg = true;
                start++;
            }
            for(int i = start; i < x.length(); i++)
                if(x.charAt(i) == '.')
                {
                    res = Long.parseLong(sb.toString());
                    sb = new StringBuilder("0");
                    dec = true;
                }
                else
                {
                    sb.append(x.charAt(i));
                    if(dec)
                        f *= 10;
                }
            res += Long.parseLong(sb.toString()) / f;
            return res * (neg?-1:1);
        }

        public boolean ready() throws IOException {return br.ready();}

    }
}


import java.io.*;
import java.util.HashMap;
import java.util.StringTokenizer;

/**
 * Created by aa on 1/06/2016.
 */
public class C {
    static class Pair
    {
        char c ; int num;
        Pair(char x , int n)
        {
            c = x;
            num = n;
        }
    }
    public static void main(String [] args) throws  Exception
    {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
        StringBuilder sb = new StringBuilder();
        HashMap<Character , Integer> getN = new HashMap<Character, Integer>();
        for(int i = 0 ; i < 10 ; ++i)
        {
            getN.put((char)(i+'0') , i);
        }

        for(int i = 10  ; i<=35 ; ++i)
            getN.put((char)((i-10)+'A') , i);

        for(int i = 36 ; i <=  61 ; ++i)
            getN.put((char)((i-36)+'a') , i);

        getN.put('-'  ,62);getN.put('_'  ,63);
        int cnt [] = new int[64];
        for(int i = 0 ; i < 64  ; ++i) {
            for (int j = 0; j < 64; ++j)
            {
                cnt[(i&j)]++;
            }

        }
        char []  inp= sc.next().toCharArray();
        long ans = 1;
        long mod = 1000000007;
        for(int i = 0 ; i < inp.length ; ++i)
        {
            ans= ((ans%mod)*(cnt[(getN.get(inp[i]))] % mod))%mod;

        }
        System.out.println(ans);
    }
    static class Scanner
    {
        StringTokenizer st;
        BufferedReader br;

        public Scanner(InputStream s){	br = new BufferedReader(new InputStreamReader(s));}

        public String next() throws IOException
        {
            while (st == null || !st.hasMoreTokens())
                st = new StringTokenizer(br.readLine());
            return st.nextToken();
        }

        public int nextInt() throws IOException {return Integer.parseInt(next());}

        public long nextLong() throws IOException {return Long.parseLong(next());}

        public String nextLine() throws IOException {return br.readLine();}

        public double nextDouble() throws IOException
        {
            String x = next();
            StringBuilder sb = new StringBuilder("0");
            double res = 0, f = 1;
            boolean dec = false, neg = false;
            int start = 0;
            if(x.charAt(0) == '-')
            {
                neg = true;
                start++;
            }
            for(int i = start; i < x.length(); i++)
                if(x.charAt(i) == '.')
                {
                    res = Long.parseLong(sb.toString());
                    sb = new StringBuilder("0");
                    dec = true;
                }
                else
                {
                    sb.append(x.charAt(i));
                    if(dec)
                        f *= 10;
                }
            res += Long.parseLong(sb.toString()) / f;
            return res * (neg?-1:1);
        }

        public boolean ready() throws IOException {return br.ready();}

    }
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskC solver = new TaskC();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskC {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            String s = in.next();
            int numOfZero = 0;
            for (int i = 0; i < s.length(); i++) {
                int bin;
                if (s.charAt(i) >= '0' && s.charAt(i) <= '9') bin = s.charAt(i) - '0';
                else if (s.charAt(i) >= 'A' && s.charAt(i) <= 'Z') bin = s.charAt(i) - 'A' + 10;
                else if (s.charAt(i) >= 'a' && s.charAt(i) <= 'z') bin = s.charAt(i) - 'a' + 36;
                else if (s.charAt(i) == '-') bin = 62;
                else bin = 63;
                numOfZero += 6 - Integer.bitCount(bin);
            }
            out.println(myPow(numOfZero));
        }

        long myPow(long n) {
            if (n == 0) return 1;
            if (n == 1) return 3;
            else {
                long tmp = myPow(n / 2);
                if (n % 2 == 0) return (tmp * tmp) % 1_000_000_007;
                else return (((tmp * 3) % 1_000_000_007) * tmp) % 1_000_000_007;
            }
        }

    }

    static class InputReader {
        private StringTokenizer tokenizer;
        private BufferedReader reader;

        public InputReader(InputStream inputStream) {
            reader = new BufferedReader(new InputStreamReader(inputStream));
        }

        private void fillTokenizer() {
            if (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (Exception e) {
                    throw new RuntimeException(e);
                }
            }
        }

        public String next() {
            fillTokenizer();
            return tokenizer.nextToken();
        }

    }
}


/* package whatever; // don't place package name! */

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

/* Name of the class has to be "Main" only if the class is public. */
public class Ideone
{
	public static void main (String[] args) throws java.lang.Exception
	{
		// your code goes here
		MyScanner sc = new MyScanner();
		String s = sc.nextLine();
		int len = s.length();
		long count = 0;
		long MOD = 1000000007;
		long[] arr = new long[len];
		for (int i = 0; i < len; ++i){
			int c = convert(s.charAt(i));
			long cur = 0;
			for (int g = 0; g <= 63; ++g){
				for (int j = 0; j <= 63; ++j){
					if ((g & j) == c){
						//System.out.println(g + " " + j + " " + c);
						cur++;
					}
				}
				arr[i] = cur;
			}
		}
		long res = arr[0] % MOD;
		for (int i = 1; i < len; ++i){
			res = (res * arr[i]) % MOD;
		}
		System.out.println(res);
	}

	public static int convert(char z){
		if (z >= '0' && z <= '9'){
			return (int) (z - '0');
		}else if (z >= 'A' && z <= 'Z'){
			return (int) (z - 'A') + 10;
		}else if (z >= 'a' && z <= 'z'){
			return (int) (z - 'a') + 36;
		}else if (z == '-'){
			return 62;
		}else{
			return 63;
		}
	}

	    //-----------PrintWriter for faster output---------------------------------
   public static PrintWriter out;

   //-----------MyScanner class for faster input----------
   public static class MyScanner {
      BufferedReader br;
      StringTokenizer st;

      public MyScanner() {
         br = new BufferedReader(new InputStreamReader(System.in));
      }

      String next() {
          while (st == null || !st.hasMoreElements()) {
              try {
                  st = new StringTokenizer(br.readLine());
              } catch (IOException e) {
                  e.printStackTrace();
              }
          }
          return st.nextToken();
      }

      int nextInt() {
          return Integer.parseInt(next());
      }

      long nextLong() {
          return Long.parseLong(next());
      }

      double nextDouble() {
          return Double.parseDouble(next());
      }

      String nextLine(){
          String str = "";
      try {
         str = br.readLine();
      } catch (IOException e) {
         e.printStackTrace();
      }
      return str;
      }

   }
}


import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

public class Main {
	static Map<Character,Integer> map = new HashMap<Character,Integer>();
	public static void initMap(){
		int i = 0;
		for(char c='0';c<='9';c++,i++){
			map.put(c, i);
		}
		for(char c='A';c<='Z';c++,i++){
			map.put(c, i);
		}
		for(char c='a';c<='z';c++,i++){
			map.put(c, i);
		}
		map.put('-', 62);
		map.put('_', 63);
	}

	public static long calcOnes(char c){
		int num = map.get(c);
		long count = 0;
		while(num != 0){
			if(num % 2 == 1){
				count++;
			}
			num /= 2;
		}
		return count;
	}
	public static long calcZeros(int n, char c){
		int x = 0;
		int num = map.get(c);
		while(num != 0){
			x++;
			num /= 2;
		}
		//x += 1;
		return ((6 * (n-1)) + x);
	}
	public static long pow(long base, long exp){
		long ans = 1;
		for(int i=0;i<exp;i++){
			ans = (ans * base) % 1000000007;
		}
		return ans;
	}
	public static void main(String[] args){
		initMap();
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		long ones = 0;
		for(int i=0;i<s.length();i++){
			ones += calcOnes(s.charAt(i));
		}
		long all = calcZeros(s.length(),s.charAt(s.length() - 1));
		long zeros = all - ones;
		//System.out.println(zeros);
		System.out.println(pow(3, zeros));
	}
}


import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

public class Main {
	static Map<Character,Integer> map = new HashMap<Character,Integer>();
	public static void initMap(){
		int i = 0;
		for(char c='0';c<='9';c++,i++){
			map.put(c, i);
		}
		for(char c='A';c<='Z';c++,i++){
			map.put(c, i);
		}
		for(char c='a';c<='z';c++,i++){
			map.put(c, i);
		}
		map.put('_', 62);
		map.put('-', 63);
	}

	public static long calcOnes(char c){
		int num = map.get(c);
		long count = 0;
		while(num != 0){
			if(num % 2 == 1){
				count++;
			}
			num /= 2;
		}
		return count;
	}
	public static long calcZeros(int n, char c){
		int x = 0;
		int num = map.get(c);
		while(num != 0){
			x++;
			num /= 2;
		}
		//x += 1;
		return ((6 * (n-1)) + x);
	}
	public static long pow(long base, long exp){
		long ans = 1;
		for(int i=0;i<exp;i++){
			ans = (ans * base) % 1000000007;
		}
		return ans;
	}
	public static void main(String[] args){
		initMap();
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		long ones = 0;
		for(int i=0;i<s.length();i++){
			ones += calcOnes(s.charAt(i));
		}
		long all = calcZeros(s.length(),s.charAt(s.length() - 1));
		long zeros = all - ones;
		System.out.println(pow(3, zeros));
	}
}


import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

public class Main {
	static Map<Character,Integer> map = new HashMap<Character,Integer>();
	public static void initMap(){
		int i = 0;
		for(char c='0';c<='9';c++,i++){
			map.put(c, i);
		}
		for(char c='A';c<='Z';c++,i++){
			map.put(c, i);
		}
		for(char c='a';c<='z';c++,i++){
			map.put(c, i);
		}
		map.put('-', 62);
		map.put('_', 63);
	}

	public static long calcOnes(char c){
		int num = map.get(c);
		long count = 0;
		while(num != 0){
			if(num % 2 == 1){
				count++;
			}
			num /= 2;
		}
		return count;
	}
	public static long calcZeros(int n, char c){
		int x = 0;
		int num = map.get(c);
		while(num != 0){
			x++;
			num /= 2;
		}
		//x += 1;
		return ((6 * (n-1)) + x);
	}
	public static long pow(long base, long exp){
		long ans = 1;
		for(int i=0;i<exp;i++){
			ans = (ans * base) % 1000000007;
		}
		return ans;
	}
	public static void main(String[] args){
		initMap();
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		long ones = 0;
		for(int i=0;i<s.length();i++){
			ones += calcOnes(s.charAt(i));
		}
		long all = calcZeros(s.length(),s.charAt(s.length() - 1));
		long zeros = (6*s.length()) - ones;
		System.out.println(pow(3, zeros));
	}
}


package Round355;

import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

public class Main {
	static Map<Character,Integer> map = new HashMap<Character,Integer>();
	public static void initMap(){
		int i = 0;
		for(char c='0';c<='9';c++,i++){
			map.put(c, i);
		}
		for(char c='A';c<='Z';c++,i++){
			map.put(c, i);
		}
		for(char c='a';c<='z';c++,i++){
			map.put(c, i);
		}
		map.put('_', 62);
		map.put('-', 63);
	}

	public static long calcOnes(char c){
		int num = map.get(c);
		long count = 0;
		while(num != 0){
			if(num % 2 == 1){
				count++;
			}
			num /= 2;
		}
		return count;
	}
	public static long calcZeros(int n, char c){
		int x = 0;
		int num = map.get(c);
		while(num != 0){
			x++;
			num /= 2;
		}
		//x += 1;
		return ((6 * (n-1)) + x);
	}
	public static long pow(long base, long exp){
		long ans = 1;
		for(int i=0;i<exp;i++){
			ans = (ans * base) % 1000000007;
		}
		return ans;
	}
	public static void main(String[] args){
		initMap();
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		long ones = 0;
		for(int i=0;i<s.length();i++){
			ones += calcOnes(s.charAt(i));
		}
		long all = calcZeros(s.length(),s.charAt(s.length() - 1));
		long zeros = all - ones;
		System.out.println(pow(3, zeros));
	}
}


import java.io.*;
import java.util.*;
public class bitwise {

	public static void main(String[]args) throws IOException{
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		String in=br.readLine();
		long res=1;
		for(int i=0; i<in.length(); i++){
			char c=in.charAt(i);
			if(c=='-')
				{res=(res*3)%(1000000000+7);
				}
			else
			if(c!='_')
			{
				int k;
				if(c>='0'&&c<='9')
					k=Integer.parseInt(c+"");
				else
					if(c>='a'&&c<='z')
						k=c-'a'+36;
					else
						k=c-'A'+10;
				int l;
				for(l=0;l<6; l++)
					if(((1<<l)&k)==0)
						res=(res*3)%(1000000000+7);

			}
		}
		System.out.println(res);
	}
}


import java.io.*;
import java.util.*;
public class bitwise {

	public static void main(String[]args) throws IOException{
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		String in=br.readLine();
		int res=1;
		for(int i=0; i<in.length(); i++){
			char c=in.charAt(i);
			if(c=='-')
				{res=(res*3)%(1000000000+7);
				}
			else
			if(c!='_')
			{
				int k;
				if(c>='0'&&c<='9')
					k=Integer.parseInt(c+"");
				else
					if(c>='a'&&c<='z')
						k=c-'a'+36;
					else
						k=c-'A'+10;
				int l;
				for(l=0;l<6; l++)
					if(((1<<l)&k)==0)
						res=(res*3)%(1000000000+7);

			}
		}
		System.out.println(res);
	}
}


import java.util.*;
import java.lang.*;
import java.math.*;
import java.io.*;
import java.util.HashSet;
import java.util.Arrays;
import java.util.Scanner;
import java.util.Set;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import java.text.DecimalFormat;
import java.lang.Math;
import java.util.Iterator;
import java.util.TreeSet;
import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigDecimal;
import java.util.*;
public class C1343{
	public static PrintWriter out = new PrintWriter (new BufferedOutputStream(System.out));
	static long MOD = (long)(1e9+7);
	static FastReader sc = new FastReader();
	static int pInf = Integer.MAX_VALUE;
	static int nInf = Integer.MIN_VALUE;
	public static void main(String[] args){
		int t = 1;
		while(t-->0){
		    String s = sc.next();
		    String a = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_";
		    long ans = 1;
		    for(int i = 0; i < s.length(); i++){
		        for(int j = 0; j < 64; j++){
		            if(s.charAt(i)==a.charAt(j)){
		                long d = (long)Math.pow(3,6-Integer.bitCount(j));
		                ans = (ans*d)%MOD;
		            }
		        }
		    }
		    out.println(ans%MOD);
		}
		out.close();
	}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//Integer.lowestOneBit(i)   Equals k where k is the position of the first one in the binary
//Integer.highestOneBit(i)  Equals k where k is the position of the last one in the binary
//Integer.bitCount(i)       returns the number of one-bits
//Collections.sort(A,(p1,p2)->(int)(p2.x-p1.x)) To sort ArrayList in descending order wrt values of x.
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

//Pair Class
	static class Pair implements Comparable<Pair>{
		int x;
		int y;
		public Pair(int x, int y) {
			this.x = x;
			this.y = y;
		}
		@Override
		public int compareTo(Pair o) {
			// TODO Auto-generated method stub
			if(this.x==o.x){
			    return (this.y-o.y);
			}
			return (this.x-o.x);
		}
	}
//Merge Sort
	static void merge(long arr[], int l, int m, int r)
    {
        // Find sizes of two subarrays to be merged
        int n1 = m - l + 1;
        int n2 = r - m;

        /* Create temp arrays */
        long L[] = new long [n1];
        long R[] = new long [n2];

        /*Copy data to temp arrays*/
        for (int i=0; i<n1; ++i)
            L[i] = arr[l + i];
        for (int j=0; j<n2; ++j)
            R[j] = arr[m + 1+ j];

        /* Merge the temp arrays */

        // Initial indexes of first and second subarrays
        int i = 0, j = 0;

        // Initial index of merged subarry array
        int k = l;
        while (i < n1 && j < n2)
        {
            if (L[i] <= R[j])
            {
                arr[k] = L[i];
                i++;
            }
            else
            {
                arr[k] = R[j];
                j++;
            }
            k++;
        }

        /* Copy remaining elements of L[] if any */
        while (i < n1)
        {
            arr[k] = L[i];
            i++;
            k++;
        }

        /* Copy remaining elements of R[] if any */
        while (j < n2)
        {
            arr[k] = R[j];
            j++;
            k++;
        }
    }

    // Main function that sorts arr[l..r] using
    // merge()
    static void sort(long arr[], int l, int r)
    {
        if (l < r)
        {
            // Find the middle point
            int m = (l+r)/2;

            // Sort first and second halves
            sort(arr, l, m);
            sort(arr , m+1, r);

            // Merge the sorted halves
            merge(arr, l, m, r);
        }
    }
//Brian Kernighan’s Algorithm
    static long countSetBits(long n){
        if(n==0) return 0;
        return 1+countSetBits(n&(n-1));
    }
//Factorial
    static long factorial(long n){
        if(n==1) return 1;
        if(n==2) return 2;
        if(n==3) return 6;
        return n*factorial(n-1);
    }
//Euclidean Algorithm
    static long gcd(long A,long B){
        if(B==0) return A;
        return gcd(B,A%B);
    }
//Modular Exponentiation
    static long fastExpo(long x,long n){
        if(n==0) return 1;
        if((n&1)==0) return fastExpo((x*x)%MOD,n/2)%MOD;
        return ((x%MOD)*fastExpo((x*x)%MOD,(n-1)/2))%MOD;
    }
//AKS Algorithm
    static boolean isPrime(long n){
        if(n<=1) return false;
        if(n<=3) return true;
        if(n%2==0 || n%3==0) return false;
        for(int i=5;i*i<=n;i+=6)
            if(n%i==0 || n%(i+2)==0) return false;
        return true;
    }
//Reverse an array
    static <T> void reverse(T arr[],int l,int r){
    	Collections.reverse(Arrays.asList(arr).subList(l, r));
    }
//Sieve of eratosthenes
    static int[] findPrimes(int n){
        boolean isPrime[]=new boolean[n+1];
        ArrayList<Integer> a=new ArrayList<>();
        int result[];
        Arrays.fill(isPrime,true);
        isPrime[0]=false;
        isPrime[1]=false;
        for(int i=2;i*i<=n;++i){
            if(isPrime[i]==true){
                for(int j=i*i;j<=n;j+=i) isPrime[j]=false;
            }
        }
        for(int i=0;i<=n;i++) if(isPrime[i]==true) a.add(i);
        result=new int[a.size()];
        for(int i=0;i<a.size();i++) result[i]=a.get(i);
        return result;

    }
//Euler Totent function
    static long countCoprimes(long n){
        ArrayList<Long> prime_factors=new ArrayList<>();
        long x=n,flag=0;
        while(x%2==0){
            if(flag==0) prime_factors.add(2L);
            flag=1;
            x/=2;
        }
        for(long i=3;i*i<=x;i+=2){
            flag=0;
            while(x%i==0){
                if(flag==0) prime_factors.add(i);
                flag=1;
                x/=i;
            }
        }
        if(x>2) prime_factors.add(x);
        double ans=(double)n;
        for(Long p:prime_factors){
            ans*=(1.0-(Double)1.0/p);
        }
        return (long)ans;
    }
	public static int bSearch(int n,ArrayList<Integer> A){
	    int s = 0;
	    int e = A.size()-1;
	    while(s<=e){
	        int m = s+(e-s)/2;
	        if(A.get(m)==(long)n){
	            return A.get(m);
	        }
	        else if(A.get(m)>(long)n){
	            e = m-1;
	        }
	        else{
	            s = m+1;
	        }
	    }
	    return A.get(e);
	}
	static long modulo = (long)1e9+7;
	public static long modinv(long x){
	    return modpow(x, modulo-2);
	}
	public static long modpow(long a, long b){
	    if(b==0){
	        return 1;
	    }
	    long x = modpow(a, b/2);
	    x = (x*x)%modulo;
	    if(b%2==1){
	        return (x*a)%modulo;
	    }
	    return x;
	}
	public static class FastReader {
		BufferedReader br;
		StringTokenizer st;
		//it reads the data about the specified point and divide the data about it ,it is quite fast
		//than using direct

		public FastReader() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}

		String next() {
			while (st == null || !st.hasMoreTokens()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (Exception r) {
					r.printStackTrace();
				}
			}
			return st.nextToken();
		}

		int nextInt() {
			return Integer.parseInt(next());//converts string to integer
		}

		double nextDouble() {
			return Double.parseDouble(next());
		}

		long nextLong() {
			return Long.parseLong(next());
		}

		String nextLine() {
			String str = "";
			try {
				str = br.readLine();
			} catch (Exception r) {
				r.printStackTrace();
			}
			return str;
		}
	}
}


import java.util.*;
import java.lang.*;
import java.math.*;
import java.io.*;
import java.util.HashSet;
import java.util.Arrays;
import java.util.Scanner;
import java.util.Set;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import java.text.DecimalFormat;
import java.lang.Math;
import java.util.Iterator;
import java.util.TreeSet;
import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigDecimal;
import java.util.*;
public class C1343{
	public static PrintWriter out = new PrintWriter (new BufferedOutputStream(System.out));
	static long MOD = (long)(1e9+7);
	static FastReader sc = new FastReader();
	static int pInf = Integer.MAX_VALUE;
	static int nInf = Integer.MIN_VALUE;
	public static void main(String[] args){
		int t = 1;
		while(t-->0){
		    String s = sc.next();
		    String a = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_";
		    long ans = 1;
		    for(int i = 0; i < s.length(); i++){
		        for(int j = 0; j < 64; j++){
		            if(s.charAt(i)==a.charAt(j)){
		                int d = (int)Math.pow(3,6-Integer.bitCount(j));
		                ans *= d%MOD;
		            }
		        }
		    }
		    out.println(ans%MOD);
		}
		out.close();
	}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//Integer.lowestOneBit(i)   Equals k where k is the position of the first one in the binary
//Integer.highestOneBit(i)  Equals k where k is the position of the last one in the binary
//Integer.bitCount(i)       returns the number of one-bits
//Collections.sort(A,(p1,p2)->(int)(p2.x-p1.x)) To sort ArrayList in descending order wrt values of x.
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

//Pair Class
	static class Pair implements Comparable<Pair>{
		int x;
		int y;
		public Pair(int x, int y) {
			this.x = x;
			this.y = y;
		}
		@Override
		public int compareTo(Pair o) {
			// TODO Auto-generated method stub
			if(this.x==o.x){
			    return (this.y-o.y);
			}
			return (this.x-o.x);
		}
	}
//Merge Sort
	static void merge(long arr[], int l, int m, int r)
    {
        // Find sizes of two subarrays to be merged
        int n1 = m - l + 1;
        int n2 = r - m;

        /* Create temp arrays */
        long L[] = new long [n1];
        long R[] = new long [n2];

        /*Copy data to temp arrays*/
        for (int i=0; i<n1; ++i)
            L[i] = arr[l + i];
        for (int j=0; j<n2; ++j)
            R[j] = arr[m + 1+ j];

        /* Merge the temp arrays */

        // Initial indexes of first and second subarrays
        int i = 0, j = 0;

        // Initial index of merged subarry array
        int k = l;
        while (i < n1 && j < n2)
        {
            if (L[i] <= R[j])
            {
                arr[k] = L[i];
                i++;
            }
            else
            {
                arr[k] = R[j];
                j++;
            }
            k++;
        }

        /* Copy remaining elements of L[] if any */
        while (i < n1)
        {
            arr[k] = L[i];
            i++;
            k++;
        }

        /* Copy remaining elements of R[] if any */
        while (j < n2)
        {
            arr[k] = R[j];
            j++;
            k++;
        }
    }

    // Main function that sorts arr[l..r] using
    // merge()
    static void sort(long arr[], int l, int r)
    {
        if (l < r)
        {
            // Find the middle point
            int m = (l+r)/2;

            // Sort first and second halves
            sort(arr, l, m);
            sort(arr , m+1, r);

            // Merge the sorted halves
            merge(arr, l, m, r);
        }
    }
//Brian Kernighan’s Algorithm
    static long countSetBits(long n){
        if(n==0) return 0;
        return 1+countSetBits(n&(n-1));
    }
//Factorial
    static long factorial(long n){
        if(n==1) return 1;
        if(n==2) return 2;
        if(n==3) return 6;
        return n*factorial(n-1);
    }
//Euclidean Algorithm
    static long gcd(long A,long B){
        if(B==0) return A;
        return gcd(B,A%B);
    }
//Modular Exponentiation
    static long fastExpo(long x,long n){
        if(n==0) return 1;
        if((n&1)==0) return fastExpo((x*x)%MOD,n/2)%MOD;
        return ((x%MOD)*fastExpo((x*x)%MOD,(n-1)/2))%MOD;
    }
//AKS Algorithm
    static boolean isPrime(long n){
        if(n<=1) return false;
        if(n<=3) return true;
        if(n%2==0 || n%3==0) return false;
        for(int i=5;i*i<=n;i+=6)
            if(n%i==0 || n%(i+2)==0) return false;
        return true;
    }
//Reverse an array
    static <T> void reverse(T arr[],int l,int r){
    	Collections.reverse(Arrays.asList(arr).subList(l, r));
    }
//Sieve of eratosthenes
    static int[] findPrimes(int n){
        boolean isPrime[]=new boolean[n+1];
        ArrayList<Integer> a=new ArrayList<>();
        int result[];
        Arrays.fill(isPrime,true);
        isPrime[0]=false;
        isPrime[1]=false;
        for(int i=2;i*i<=n;++i){
            if(isPrime[i]==true){
                for(int j=i*i;j<=n;j+=i) isPrime[j]=false;
            }
        }
        for(int i=0;i<=n;i++) if(isPrime[i]==true) a.add(i);
        result=new int[a.size()];
        for(int i=0;i<a.size();i++) result[i]=a.get(i);
        return result;

    }
//Euler Totent function
    static long countCoprimes(long n){
        ArrayList<Long> prime_factors=new ArrayList<>();
        long x=n,flag=0;
        while(x%2==0){
            if(flag==0) prime_factors.add(2L);
            flag=1;
            x/=2;
        }
        for(long i=3;i*i<=x;i+=2){
            flag=0;
            while(x%i==0){
                if(flag==0) prime_factors.add(i);
                flag=1;
                x/=i;
            }
        }
        if(x>2) prime_factors.add(x);
        double ans=(double)n;
        for(Long p:prime_factors){
            ans*=(1.0-(Double)1.0/p);
        }
        return (long)ans;
    }
	public static int bSearch(int n,ArrayList<Integer> A){
	    int s = 0;
	    int e = A.size()-1;
	    while(s<=e){
	        int m = s+(e-s)/2;
	        if(A.get(m)==(long)n){
	            return A.get(m);
	        }
	        else if(A.get(m)>(long)n){
	            e = m-1;
	        }
	        else{
	            s = m+1;
	        }
	    }
	    return A.get(e);
	}
	static long modulo = (long)1e9+7;
	public static long modinv(long x){
	    return modpow(x, modulo-2);
	}
	public static long modpow(long a, long b){
	    if(b==0){
	        return 1;
	    }
	    long x = modpow(a, b/2);
	    x = (x*x)%modulo;
	    if(b%2==1){
	        return (x*a)%modulo;
	    }
	    return x;
	}
	public static class FastReader {
		BufferedReader br;
		StringTokenizer st;
		//it reads the data about the specified point and divide the data about it ,it is quite fast
		//than using direct

		public FastReader() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}

		String next() {
			while (st == null || !st.hasMoreTokens()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (Exception r) {
					r.printStackTrace();
				}
			}
			return st.nextToken();
		}

		int nextInt() {
			return Integer.parseInt(next());//converts string to integer
		}

		double nextDouble() {
			return Double.parseDouble(next());
		}

		long nextLong() {
			return Long.parseLong(next());
		}

		String nextLine() {
			String str = "";
			try {
				str = br.readLine();
			} catch (Exception r) {
				r.printStackTrace();
			}
			return str;
		}
	}
}


package leetcode;

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.util.HashMap;
import java.util.Scanner;

public class a {
	static class Reader
    {
        final private int BUFFER_SIZE = 1 << 16;
        private DataInputStream din;
        private byte[] buffer;
        private int bufferPointer, bytesRead;
public Reader()
        {
            din = new DataInputStream(System.in);
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }
public Reader(String file_name) throws IOException
        {
            din = new DataInputStream(new FileInputStream(file_name));
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }
public String readLine() throws IOException
        {
            byte[] buf = new byte[64]; // line length
            int cnt = 0, c;
            while ((c = read()) != -1)
            {
                if (c == '\n')
                    break;
                buf[cnt++] = (byte) c;
            }
            return new String(buf, 0, cnt);
        }
public int nextInt() throws IOException
        {
            int ret = 0;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();
            do
            {
                ret = ret * 10 + c - '0';
            }  while ((c = read()) >= '0' && c <= '9');
if (neg)
                return -ret;
            return ret;
        }
public long nextLong() throws IOException
        {
            long ret = 0;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();
            do {
                ret = ret * 10 + c - '0';
            }
            while ((c = read()) >= '0' && c <= '9');
            if (neg)
                return -ret;
            return ret;
        }
public double nextDouble() throws IOException
        {
            double ret = 0, div = 1;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();
do {
                ret = ret * 10 + c - '0';
            }
            while ((c = read()) >= '0' && c <= '9');
if (c == '.')
            {
                while ((c = read()) >= '0' && c <= '9')
                {
                    ret += (c - '0') / (div *= 10);
                }
            }
if (neg)
                return -ret;
            return ret;
        }
private void fillBuffer() throws IOException
        {
            bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
            if (bytesRead == -1)
                buffer[0] = -1;
        }
private byte read() throws IOException
        {
            if (bufferPointer == bytesRead)
                fillBuffer();
            return buffer[bufferPointer++];
        }
public void close() throws IOException
        {
            if (din == null)
                return;
            din.close();
        }
    }

	//User Defined Method start
	public static int inputInt()throws IOException
    {
        return sc.nextInt();
    }
    public static long inputLong()throws IOException
    {
        return sc.nextLong();
    }
    public static double inputDouble()throws IOException
    {
        return sc.nextDouble();
    }
    public static String inputString()throws IOException
    {
        return sc.readLine();
    }
    public static void print(String a)throws IOException
    {
        bw.write(a);
    }
    public static void printSp(String a)throws IOException
    {
        bw.write(a+" ");
    }
    public static void println(String a)throws IOException
    {
        bw.write(a+"\n");
    }
	//User Defined Method End

  //Helper Function - start
    private static void printArray(Integer arr[])
    {
    	for(int i:arr)
    		System.out.print(i+" ");
    	System.out.println();
    }

    private static void inputArray(int arr[]) throws IOException
    {
    	for(int i=0;i<arr.length;i++)
    	{
    		arr[i] = inputInt();
    	}
    }

    //helper Function - End

	//Defining input and output stream obj - Start
    static Reader sc=new Reader();
    static BufferedWriter bw=new BufferedWriter(new OutputStreamWriter(System.out));
    static BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
    static Scanner s1 = new Scanner(System.in);
    //Defining input and output stream obj - End
    static int mod = 1000000000+7;

	public static void main(String[] args) throws Exception{

		String s = s1.nextLine();
		s = s.trim();
		HashMap<Character,Integer> map = new HashMap<>();

		for(int i=0;i<10;i++)
			map.put((char)(i+'0'), i);
		for(int i=10;i<36;i++)
			map.put((char)('A'+i-10), i);
		for(int i=36;i<62;i++)
			map.put((char)('a'+i-36), i);
		map.put('-', 62);
		map.put('_', 63);

//		System.out.println(map);

		long ans = 1;
		for(int i=0;i<s.length();i++)
		{
			int x = map.get(s.charAt(i));
			for(int j=0;j<6;j++){
				if((x & (1<<j)) == 0)
					ans = (ans*3)%mod;
			}
		}

		System.out.println(ans);
	}

}


import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.util.HashMap;

public class a {
	static class Reader
    {
        final private int BUFFER_SIZE = 1 << 16;
        private DataInputStream din;
        private byte[] buffer;
        private int bufferPointer, bytesRead;
public Reader()
        {
            din = new DataInputStream(System.in);
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }
public Reader(String file_name) throws IOException
        {
            din = new DataInputStream(new FileInputStream(file_name));
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }
public String readLine() throws IOException
        {
            byte[] buf = new byte[64]; // line length
            int cnt = 0, c;
            while ((c = read()) != -1)
            {
                if (c == '\n')
                    break;
                buf[cnt++] = (byte) c;
            }
            return new String(buf, 0, cnt);
        }
public int nextInt() throws IOException
        {
            int ret = 0;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();
            do
            {
                ret = ret * 10 + c - '0';
            }  while ((c = read()) >= '0' && c <= '9');
if (neg)
                return -ret;
            return ret;
        }
public long nextLong() throws IOException
        {
            long ret = 0;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();
            do {
                ret = ret * 10 + c - '0';
            }
            while ((c = read()) >= '0' && c <= '9');
            if (neg)
                return -ret;
            return ret;
        }
public double nextDouble() throws IOException
        {
            double ret = 0, div = 1;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();
do {
                ret = ret * 10 + c - '0';
            }
            while ((c = read()) >= '0' && c <= '9');
if (c == '.')
            {
                while ((c = read()) >= '0' && c <= '9')
                {
                    ret += (c - '0') / (div *= 10);
                }
            }
if (neg)
                return -ret;
            return ret;
        }
private void fillBuffer() throws IOException
        {
            bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
            if (bytesRead == -1)
                buffer[0] = -1;
        }
private byte read() throws IOException
        {
            if (bufferPointer == bytesRead)
                fillBuffer();
            return buffer[bufferPointer++];
        }
public void close() throws IOException
        {
            if (din == null)
                return;
            din.close();
        }
    }

	//User Defined Method start
	public static int inputInt()throws IOException
    {
        return sc.nextInt();
    }
    public static long inputLong()throws IOException
    {
        return sc.nextLong();
    }
    public static double inputDouble()throws IOException
    {
        return sc.nextDouble();
    }
    public static String inputString()throws IOException
    {
        return sc.readLine();
    }
    public static void print(String a)throws IOException
    {
        bw.write(a);
    }
    public static void printSp(String a)throws IOException
    {
        bw.write(a+" ");
    }
    public static void println(String a)throws IOException
    {
        bw.write(a+"\n");
    }
	//User Defined Method End

  //Helper Function - start
    private static void printArray(Integer arr[])
    {
    	for(int i:arr)
    		System.out.print(i+" ");
    	System.out.println();
    }

    private static void inputArray(int arr[]) throws IOException
    {
    	for(int i=0;i<arr.length;i++)
    	{
    		arr[i] = inputInt();
    	}
    }

    //helper Function - End

	//Defining input and output stream obj - Start
    static Reader sc=new Reader();
    static BufferedWriter bw=new BufferedWriter(new OutputStreamWriter(System.out));
    static BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
    static StringBuilder s1 = new StringBuilder("");
    //Defining input and output stream obj - End
    static int mod = 1000000000+7;

	public static void main(String[] args) throws Exception{

		String s = inputString();
		s = s.trim();
		HashMap<Character,Integer> map = new HashMap<>();

		for(int i=0;i<10;i++)
			map.put((char)(i+'0'), i);
		for(int i=10;i<36;i++)
			map.put((char)('A'+i-10), i);
		for(int i=36;i<62;i++)
			map.put((char)('a'+i-36), i);
		map.put('-', 62);
		map.put('_', 63);

//		System.out.println(map);

		long ans = 1;
		for(int i=0;i<s.length();i++)
		{
			int x = map.get(s.charAt(i));
			for(int j=0;j<6;j++){
				if((x & (1<<j)) == 0)
					ans = (ans*3)%mod;
			}
		}

		System.out.println(ans);
	}

}


import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.util.HashMap;
import java.util.Scanner;

public class a {
	static class Reader
    {
        final private int BUFFER_SIZE = 1 << 16;
        private DataInputStream din;
        private byte[] buffer;
        private int bufferPointer, bytesRead;
public Reader()
        {
            din = new DataInputStream(System.in);
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }
public Reader(String file_name) throws IOException
        {
            din = new DataInputStream(new FileInputStream(file_name));
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }
public String readLine() throws IOException
        {
            byte[] buf = new byte[64]; // line length
            int cnt = 0, c;
            while ((c = read()) != -1)
            {
                if (c == '\n')
                    break;
                buf[cnt++] = (byte) c;
            }
            return new String(buf, 0, cnt);
        }
public int nextInt() throws IOException
        {
            int ret = 0;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();
            do
            {
                ret = ret * 10 + c - '0';
            }  while ((c = read()) >= '0' && c <= '9');
if (neg)
                return -ret;
            return ret;
        }
public long nextLong() throws IOException
        {
            long ret = 0;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();
            do {
                ret = ret * 10 + c - '0';
            }
            while ((c = read()) >= '0' && c <= '9');
            if (neg)
                return -ret;
            return ret;
        }
public double nextDouble() throws IOException
        {
            double ret = 0, div = 1;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();
do {
                ret = ret * 10 + c - '0';
            }
            while ((c = read()) >= '0' && c <= '9');
if (c == '.')
            {
                while ((c = read()) >= '0' && c <= '9')
                {
                    ret += (c - '0') / (div *= 10);
                }
            }
if (neg)
                return -ret;
            return ret;
        }
private void fillBuffer() throws IOException
        {
            bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
            if (bytesRead == -1)
                buffer[0] = -1;
        }
private byte read() throws IOException
        {
            if (bufferPointer == bytesRead)
                fillBuffer();
            return buffer[bufferPointer++];
        }
public void close() throws IOException
        {
            if (din == null)
                return;
            din.close();
        }
    }

	//User Defined Method start
	public static int inputInt()throws IOException
    {
        return sc.nextInt();
    }
    public static long inputLong()throws IOException
    {
        return sc.nextLong();
    }
    public static double inputDouble()throws IOException
    {
        return sc.nextDouble();
    }
    public static String inputString()throws IOException
    {
        return sc.readLine();
    }
    public static void print(String a)throws IOException
    {
        bw.write(a);
    }
    public static void printSp(String a)throws IOException
    {
        bw.write(a+" ");
    }
    public static void println(String a)throws IOException
    {
        bw.write(a+"\n");
    }
	//User Defined Method End

  //Helper Function - start
    private static void printArray(Integer arr[])
    {
    	for(int i:arr)
    		System.out.print(i+" ");
    	System.out.println();
    }

    private static void inputArray(int arr[]) throws IOException
    {
    	for(int i=0;i<arr.length;i++)
    	{
    		arr[i] = inputInt();
    	}
    }

    //helper Function - End

	//Defining input and output stream obj - Start
    static Reader sc=new Reader();
    static BufferedWriter bw=new BufferedWriter(new OutputStreamWriter(System.out));
    static BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
    static Scanner s1 = new Scanner(System.in);
    //Defining input and output stream obj - End
    static int mod = 1000000000+7;

	public static void main(String[] args) throws Exception{

		String s = s1.nextLine();
		s = s.trim();
		HashMap<Character,Integer> map = new HashMap<>();

		for(int i=0;i<10;i++)
			map.put((char)(i+'0'), i);
		for(int i=10;i<36;i++)
			map.put((char)('A'+i-10), i);
		for(int i=36;i<62;i++)
			map.put((char)('a'+i-36), i);
		map.put('-', 62);
		map.put('_', 63);

//		System.out.println(map);

		long ans = 1;
		for(int i=0;i<s.length();i++)
		{
			int x = map.get(s.charAt(i));
			for(int j=0;j<6;j++){
				if((x & (1<<j)) == 0)
					ans = (ans*3)%mod;
			}
		}

		System.out.println(ans);
	}

}


import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.util.HashMap;

public class a {
	static class Reader
    {
        final private int BUFFER_SIZE = 1 << 16;
        private DataInputStream din;
        private byte[] buffer;
        private int bufferPointer, bytesRead;
public Reader()
        {
            din = new DataInputStream(System.in);
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }
public Reader(String file_name) throws IOException
        {
            din = new DataInputStream(new FileInputStream(file_name));
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }
public String readLine() throws IOException
        {
            byte[] buf = new byte[64]; // line length
            int cnt = 0, c;
            while ((c = read()) != -1)
            {
                if (c == '\n')
                    break;
                buf[cnt++] = (byte) c;
            }
            return new String(buf, 0, cnt);
        }
public int nextInt() throws IOException
        {
            int ret = 0;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();
            do
            {
                ret = ret * 10 + c - '0';
            }  while ((c = read()) >= '0' && c <= '9');
if (neg)
                return -ret;
            return ret;
        }
public long nextLong() throws IOException
        {
            long ret = 0;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();
            do {
                ret = ret * 10 + c - '0';
            }
            while ((c = read()) >= '0' && c <= '9');
            if (neg)
                return -ret;
            return ret;
        }
public double nextDouble() throws IOException
        {
            double ret = 0, div = 1;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();
do {
                ret = ret * 10 + c - '0';
            }
            while ((c = read()) >= '0' && c <= '9');
if (c == '.')
            {
                while ((c = read()) >= '0' && c <= '9')
                {
                    ret += (c - '0') / (div *= 10);
                }
            }
if (neg)
                return -ret;
            return ret;
        }
private void fillBuffer() throws IOException
        {
            bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
            if (bytesRead == -1)
                buffer[0] = -1;
        }
private byte read() throws IOException
        {
            if (bufferPointer == bytesRead)
                fillBuffer();
            return buffer[bufferPointer++];
        }
public void close() throws IOException
        {
            if (din == null)
                return;
            din.close();
        }
    }

	//User Defined Method start
	public static int inputInt()throws IOException
    {
        return sc.nextInt();
    }
    public static long inputLong()throws IOException
    {
        return sc.nextLong();
    }
    public static double inputDouble()throws IOException
    {
        return sc.nextDouble();
    }
    public static String inputString()throws IOException
    {
        return sc.readLine();
    }
    public static void print(String a)throws IOException
    {
        bw.write(a);
    }
    public static void printSp(String a)throws IOException
    {
        bw.write(a+" ");
    }
    public static void println(String a)throws IOException
    {
        bw.write(a+"\n");
    }
	//User Defined Method End

  //Helper Function - start
    private static void printArray(Integer arr[])
    {
    	for(int i:arr)
    		System.out.print(i+" ");
    	System.out.println();
    }

    private static void inputArray(int arr[]) throws IOException
    {
    	for(int i=0;i<arr.length;i++)
    	{
    		arr[i] = inputInt();
    	}
    }

    //helper Function - End

	//Defining input and output stream obj - Start
    static Reader sc=new Reader();
    static BufferedWriter bw=new BufferedWriter(new OutputStreamWriter(System.out));
    static BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
    static StringBuilder s1 = new StringBuilder("");
    //Defining input and output stream obj - End
    static int mod = 1000000000+7;

	public static void main(String[] args) throws Exception{

		String s = inputString();
		s = s.trim();
		HashMap<Character,Integer> map = new HashMap<>();

		for(int i=0;i<10;i++)
			map.put((char)(i+'0'), i);
		for(int i=10;i<36;i++)
			map.put((char)('A'+i-10), i);
		for(int i=36;i<62;i++)
			map.put((char)('a'+i-36), i);
		map.put('-', 62);
		map.put('_', 63);

//		System.out.println(map);

		int count = 0;
		for(int i=0;i<s.length();i++)
		{
			int temp = 0;

			int x = Integer.bitCount(map.get(s.charAt(i)));
			temp += (6-x);

			count += temp;
		}

		long ans = 1;
		for(int i=0;i<count;i++)
			ans = (ans*3)%mod;

		System.out.println(ans);
	}

}