#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
char s[100010];
int main() {
  scanf("%s", s + 1);
  int n = strlen(s + 1);
  int ans = 1;
  for (int i = 1; i <= n; i++) {
    int x;
    if (s[i] >= '0' && s[i] <= '9') {
      x = s[i] - '0';
    } else if (s[i] >= 'A' && s[i] <= 'Z') {
      x = s[i] - 'A' + 10;
    } else if (s[i] >= 'a' && s[i] <= 'z') {
      x = s[i] - 'a' + 36;
    } else if (s[i] == '-') {
      x = 62;
    } else
      x = 63;
    int ct = 0;
    for (int j = 0; j < 6; j++) {
      if (x & (1 << j)) ct++;
    }
    x = 6 - ct;
    while (x--) {
      ans = 3LL * ans % mod;
    }
  }
  cout << ans << endl;
  return 0;
}
