#include <bits/stdc++.h>
using namespace std;
const int p = 1000000007;
int pow3[10];
int main() {
  pow3[0] = 1;
  pow3[1] = 3;
  pow3[2] = pow3[1] * 3;
  pow3[3] = pow3[2] * 3;
  pow3[4] = pow3[3] * 3;
  pow3[5] = pow3[4] * 3;
  pow3[6] = pow3[5] * 3;
  map<char, int> myMap;
  char c;
  long long n, k = 0, cnt = 0, res = 1;
  for (int i = 48; i <= 57; i++) {
    c = i;
    myMap.insert(make_pair(c, k));
    k++;
  }
  for (int i = 65; i <= 90; i++) {
    c = i;
    myMap.insert(make_pair(c, k));
    k++;
  }
  for (int i = 97; i <= 122; i++) {
    c = i;
    myMap.insert(make_pair(c, k));
    k++;
  }
  myMap.insert(make_pair('-', 62));
  k++;
  myMap.insert(make_pair('_', 63));
  k++;
  while (cin >> c) {
    n = myMap[c];
    cnt = 0;
    for (int i = 0; i < 6; i++) {
      if (n % 2 == 0) cnt++;
      n /= 2;
    }
    res = ((res % p) * pow3[cnt]) % p;
  }
  cout << res;
  return 0;
}
