#include <bits/stdc++.h>
using namespace std;
long long A[100] = {(long long)0};
int main() {
  for (int j = 0; j < 64; j++) {
    for (int k = j; k < 64; k++) {
      int a = j & k;
      A[a]++;
    }
  }
  string s;
  cin >> s;
  int sz = s.size();
  long long ans = 1;
  for (int i = 0; i < sz; i++) {
    if (s[i] >= '0' && s[i] <= '9') {
      ans *= (2 * A[s[i] - '0'] - 1);
    } else if (s[i] >= 'A' && s[i] <= 'Z') {
      ans *= (2 * A[s[i] - 'A' + 10] - 1);
    } else if (s[i] >= 'a' && s[i] <= 'z') {
      ans *= (2 * A[s[i] - 'a' + 36] - 1);
    } else if (s[i] == '-') {
      ans *= (2 * A[62] - 1);
    } else {
      ans *= (2 * A[63] - 1);
    }
    ans %= 1000000007;
    ;
  }
  cout << ans;
  return 0;
}
