#include <bits/stdc++.h>
using namespace std;
string s;
int a[64], cou;
long long int Mod = 1e9 + 7;
void compute() {
  for (int i = 0; i < 64; i++) {
    int n = i, sum = 6;
    while (n != 0) {
      while (n % 2 == 0) n /= 2;
      sum--;
      n = n / 2;
    }
    a[i] = sum;
  }
  return;
}
void fast(int num) {
  long long int k = 3, ans = 1;
  while (num != 0) {
    if (num % 2 == 0) {
      k *= k;
      num /= 2;
      k %= Mod;
    } else
      ans *= k, num--;
    if (ans > Mod) ans %= Mod;
  }
  cout << ans << endl;
}
int main() {
  compute();
  cin >> s;
  cou = 0;
  for (int x = 0; x < s.length(); x++) {
    if (s[x] >= '0' && s[x] <= '9')
      s[x] = s[x] - '0';
    else if (s[x] >= 'a' && s[x] <= 'z')
      s[x] = s[x] - 'a' + 36;
    else if (s[x] >= 'A' && s[x] <= 'Z')
      s[x] = s[x] - 'A' + 10;
    else if (s[x] == '-')
      s[x] = 62;
    else if (s[x] == '_')
      s[x] = 63;
    cou += a[s[x]];
  }
  fast(cou);
  return 0;
}
