#include <bits/stdc++.h>
using namespace std;
const long long inf = 1e18;
const long double eps = 1e-6;
const long long mod = 1e9 + 7;
signed main() {
  ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  string all;
  for (char i = '0'; i <= '9'; ++i) all.push_back(i);
  for (char i = 'A'; i <= 'Z'; ++i) all.push_back(i);
  for (char i = 'a'; i <= 'z'; ++i) all.push_back(i);
  all.push_back('-');
  all.push_back('_');
  map<char, long long> idx;
  for (long long i = 0; i < (long long)all.size(); ++i) idx[all[i]] = i;
  long long ans = 1;
  string s;
  cin >> s;
  for (char c : s) {
    long long x = idx[c];
    for (long long i = 0; i < 6; ++i) {
      if (!((1 << i) & x)) ans = (ans * 3) % mod;
    }
  }
  cout << ans;
  return 0;
}
