#include <bits/stdc++.h>
using namespace std;
char arr[100010];
long long i, res, val, l, zeros, MOD = 1000000007LL;
int main() {
  scanf(" %s", arr);
  l = strlen(arr);
  res = 1LL;
  for (i = 0LL; i < l; i++) {
    if (arr[i] >= '0' && arr[i] <= '9') {
      val = arr[i] - '0';
    } else if (arr[i] >= 'A' && arr[i] <= 'Z') {
      val = arr[i] - 'A' + 10LL;
    } else if (arr[i] >= 'a' && arr[i] <= 'z') {
      val = arr[i] - 'a' + 36LL;
    } else if (arr[i] == '-') {
      val = 62LL;
    } else if (arr[i] == '_') {
      val = 63LL;
    }
    zeros += (6LL - __builtin_popcount(val));
  }
  for (i = 0LL; i < zeros; i++) {
    res = (res * 3LL) % MOD;
  }
  printf("%I64d\n", res);
  return 0;
}
