#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.precision(0);
  vector<int> cnt(64, 0);
  for (int i = 0; i < 64; ++i)
    for (int j = 0; j < 64; ++j) ++cnt[i & j];
  string str;
  cin >> str;
  int l = str.length();
  long long ans = 1;
  for (int i = 0; i < l; ++i) {
    int t;
    if (str[i] == '-')
      t = 62;
    else if (str[i] == '_')
      t = 63;
    else if (str[i] >= 'A' && str[i] <= 'Z')
      t = str[i] - 'A' + 10;
    else if (str[i] >= 'a' && str[i] <= 'z')
      t = str[i] - 'a' + 36;
    else
      t = str[i] - '0';
    ans = (ans * cnt[t]) % (1000000007);
  }
  { std::cout << ans << '\n'; };
  return 0;
}
