#include <bits/stdc++.h>
using namespace std;
long long int get(char c) {
  if (c == '_') return 63;
  if (c == '-') return 62;
  if ('0' <= c && c <= '9') return (c - '0');
  if ('A' <= c && c <= 'Z') return (c - 'A' + 10);
  if ('a' <= c && c <= 'z') return (c - 'a' + 36);
  return 0;
}
int main(int argc, char const *argv[]) {
  string s;
  long long int t = 0, ans = 1;
  cin >> s;
  for (int i = 0; i < s.size(); i++) t += (6 - __builtin_popcount(get(s[i])));
  for (int i = 0; i < t; i++) ans = ((ans % 1000000007) * 3) % 1000000007;
  cout << ans;
  return EXIT_SUCCESS;
}
