#include <bits/stdc++.h>
using namespace std;
int countZeros(int i) {
  int cnt = 0;
  for (int k = 0; k < 6; k++) {
    if ((i & 1) == 0) cnt++;
    i >>= 1;
  }
  return cnt;
}
int main() {
  string s;
  cin >> s;
  map<char, int> mp;
  vector<char> v;
  for (int i = 0; i < 10; i++) {
    mp.insert(pair<char, int>('0' + i, i));
    v.push_back('0' + i);
  }
  for (int i = 0; i < 26; i++) {
    mp.insert(pair<char, int>('A' + i, 10 + i));
    v.push_back('A' + i);
  }
  for (int i = 0; i < 26; i++) {
    mp.insert(pair<char, int>('a' + i, 36 + i));
    v.push_back('a' + i);
  }
  mp.insert(pair<char, int>('-', 62));
  mp.insert(pair<char, int>('_', 63));
  v.push_back('-');
  v.push_back('_');
  long long int result = 1;
  for (int i = 0; i < s.size(); i++) {
    int cnt = countZeros(mp[s[i]]);
    for (int k = 0; k < cnt; k++) result *= 3;
    result %= 1000000007;
  }
  cout << result % 1000000007;
  return 0;
}
