#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  string s;
  string pattern;
  long long info[305];
  cin >> s;
  int n = s.length();
  long long ans = 1;
  for (char i = '0'; i <= '9'; i++) pattern.push_back(i);
  for (char i = 'A'; i <= 'Z'; i++) pattern.push_back(i);
  for (char i = 'a'; i <= 'z'; i++) pattern.push_back(i);
  pattern.push_back('-');
  pattern.push_back('_');
  for (int i = 0; i < 64; i++) info[pattern[i]] = i;
  for (int i = 0; i < n; i++) {
    int x = info[s[i]];
    for (int j = 0; j < 6; j++)
      if ((x & (1 << j)) == 0) ans = (ans * 3) % 1000000007;
  }
  cout << ans;
  return 0;
}
