#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int i, j, ans = 1, val[256], v;
  string s, p;
  cin >> s;
  char a;
  for (a = '0'; a <= '9'; a++) {
    p.push_back(a);
  }
  for (a = 'A'; a <= 'Z'; a++) {
    p.push_back(a);
  }
  for (a = 'a'; a <= 'z'; a++) {
    p.push_back(a);
  }
  p.push_back('-');
  p.push_back('_');
  for (i = 0; i <= 63; ++i) {
    val[p[i]] = i;
  }
  for (i = 0; i < s.length(); ++i) {
    v = val[s[i]];
    for (j = 0; j < 6; ++j) {
      if ((v & (1 << j)) == 0) {
        ans = (ans * 3) % 1000000007;
      }
    }
  }
  cout << ans << endl;
  return 0;
}
