#include <bits/stdc++.h>
using namespace std;
long long dx[] = {1, 0, -1, 0};
long long dy[] = {0, 1, 0, -1};
void __print(long x) { cerr << x; }
void __print(long long x) { cerr << x; }
void __print(unsigned x) { cerr << x; }
void __print(unsigned long x) { cerr << x; }
void __print(unsigned long long x) { cerr << x; }
void __print(float x) { cerr << x; }
void __print(double x) { cerr << x; }
void __print(long double x) { cerr << x; }
void __print(char x) { cerr << '\'' << x << '\''; }
void __print(const char *x) { cerr << '\"' << x << '\"'; }
void __print(const string &x) { cerr << '\"' << x << '\"'; }
void __print(bool x) { cerr << (x ? "true" : "false"); }
template <typename T, typename V>
void __print(const pair<T, V> &x) {
  cerr << '{';
  __print(x.first);
  cerr << ',';
  __print(x.second);
  cerr << '}';
}
template <typename T>
void __print(const T &x) {
  long long f = 0;
  cerr << '{';
  for (auto &i : x) cerr << (f++ ? "," : ""), __print(i);
  cerr << "}";
}
void _print() { cerr << "]\n"; }
template <typename T, typename... V>
void _print(T t, V... v) {
  __print(t);
  if (sizeof...(v)) cerr << ", ";
  _print(v...);
}
long long power(long long x, long long y, long long p) {
  long long res = 1;
  x = x % p;
  if (x == 0) return 0;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
void solve() {
  string s;
  cin >> s;
  long long n = (long long)s.size();
  map<char, long long> mp;
  for (char i = '0'; i <= '9'; i++) mp[i] = i - '0';
  long long cnt = 10;
  for (char i = 'A'; i <= 'Z'; i++) mp[i] = cnt++;
  for (char i = 'a'; i <= 'z'; i++) mp[i] = cnt++;
  mp['-'] = 62;
  mp['_'] = 63;
  long long ans = 1, tot = 0;
  for (long long i = 0; i < n; i++) {
    long long num = mp[s[i]];
    cnt = 0;
    while (num) {
      if (num % 2 == 1) cnt++;
      num /= 2;
    }
    cnt = 6 - cnt;
    tot += cnt;
  }
  cout << power(3, tot, 1000000007) << "\n";
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  solve();
  return 0;
}
