#include <bits/stdc++.h>
using namespace std;
const int MOD = (int)1e9 + 7;
const int MAX = 1e6;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  vector<char> v;
  for (int i = '0'; i <= '9'; i++) v.push_back(i);
  for (int i = 'A'; i <= 'Z'; i++) v.push_back(i);
  for (int i = 'a'; i <= 'z'; i++) v.push_back(i);
  v.push_back('-');
  v.push_back('_');
  map<char, int> mp;
  for (int i = 0; i < v.size(); i++) mp[v[i]] = i;
  string s;
  cin >> s;
  long long int ans = 1;
  for (int i = 0; i < s.length(); i++) {
    long long int cur = mp[s[i]];
    int cnt = 0, req = 6;
    while (cur > 0) {
      if (cur % 2) cnt++;
      cur /= 2;
    }
    req -= cnt;
    cnt = pow(3, req);
    ans = (ans * cnt) % MOD;
  }
  cout << ans << endl;
  return 0;
}
