Go: package main

import . "fmt"

func main() {
	for i := 1; i < 10; i++ {
		for j := 1; j < 10; j++ {
			Printf("%dx%d=%d\n", i, j, i*j)
		}
	}
}

C++: #include <functional>
#include <algorithm>
#include <stdexcept>
#include <iostream>
#include <sstream>
#include <fstream>
#include <numeric>
#include <iomanip>
#include <cstdlib>
#include <cstring>
#include <utility>
#include <cctype>
#include <vector>
#include <string>
#include <bitset>
#include <cmath>
#include <queue>
#include <stdio.h>
#include <stack>
#include <ctime>
#include <list>
#include <map>
#include <set>
#include <assert.h>
#define REP(i,n) for(int i=0;i<n;i++)
#define TR(i,x) for(typeof(x.begin()) i=x.begin();i!=x.end();i++)
#define ALL(x) x.begin(),x.end()
#define SORT(x) sort(ALL(x))
#define CLEAR(x) memset(x,0,sizeof(x))
#define FILL(x,c) memset(x,c,sizeof(x))

using namespace std;

const double eps = 1e-8;

#define PB push_back
#define MP make_pair

typedef map<int,int> MII;
typedef map<string,int> MSI;
typedef vector<int> VI;
typedef vector<string> VS;
typedef vector<long double> VD;
typedef pair<int,int> PII;
typedef long long int64;
typedef long long ll;
typedef unsigned int UI;
typedef long double LD;
typedef unsigned long long ULL;

const int V = 50000 + 100;
const ll MOD = 1000000000 + 7;

int inv[V];
int size[V], power2[V];
vector<int> adj[V];
ll hash[V], f[V];
int n, m;

int C(int x, int y) {
    assert(y < V);
    ll ret = 1;
    for (int i = 0; i < y; ++i) 
        ret = ret * (x-i) % MOD * inv[i+1] % MOD;
    return ret;
}
void dfs(int v, int fa) {
    vector<pair<int, int> > vec;
    map<int, int> mp;
    
    size[v] = 1;
    for (int i = 0; i < adj[v].size(); ++i) 
    if (adj[v][i] != fa) {
        int u = adj[v][i];
        dfs(u, v);
        vec.push_back(MP(hash[u], u));
        mp[hash[u]]++;
        size[v] += size[u];
    }
    
    f[v] = m;
    for (map<int,int>::iterator it = mp.begin(); it != mp.end(); ++it) {
        int k = it->second;
        int n = f[it->first];
        f[v] = (f[v] * C(n+k-1, k)) % MOD;
    }
    
    hash[v] = 0;
    sort(vec.begin(), vec.end());
    for (int i = 0; i < vec.size(); ++i) {
        int u = vec[i].second;
        hash[v] = (hash[v] * power2[size[u]*2] + hash[u]) % MOD;
    }
    hash[v] = (hash[v] * 2 + 1) % MOD;
}
void prepareInv(int n) {
    inv[1] = 1;
    for(int i = 2; i < n; i++) 
        inv[i] = (MOD - MOD/i) * inv[(int)(MOD%i)] % MOD;
        
    for (int i = 0; i < n; ++i)
        power2[i] = (i == 0) ? 1 : power2[i-1] * 2 % MOD;
}
int main() {
    int a, b;
    while (cin >> n >> m) {
        REP(i, n-1) {
            scanf("%d%d",&a, &b);
            a--; b--;
            adj[a].PB(b);
            adj[b].PB(a);
        }
        prepareInv(V);
        dfs(0, -1);
        cout << f[0] << endl;
    }
}

C++: #include<cstdio>
int main()
{
for(int i=1;i<=9;i++)
{
for(int j=1;j<=9;j++)
{
printf("%d*%d=%d\n",i,j,i*j);
putchar(10);
}

}
return 0;
}

C++: #include<iostream>
using namespace std;

int main(){

  for(int i=0;i<9;i++){
    for(int n=0;n<9;n++){
      cout << "n*i" << "=" << n*i << endl;
    }
  }
  return 0;
}

C++: #include<iostream>
using namespace std;

int main(){
    int i, j;
    for(i = 1; i <=9; i++){
        for(j = 1; j <=9; j++){
            cout << i << "x" << j << "=" << i*j << endl;
        }
    }

    return 0;
}

C++: #include <iostream>
using namespace std;

int main() {
  int a = 1;
  int b = 1;
  for (a < 10 && b < 9) {
    cout << b << "x" << a << "=" << a*b << endl;
    ++a;
    if (a == 10 && b <= 8)
    ++b;
    a = 1;
  }
  return 0;
}

C++: #include <iostream>
#include <cstdio>
 
using namespace std;
 
int main()
{
  for(int i=1;i<=9;i++){
    for(int j=1;j<=9;j++){
      printf("%dx%d=%d\n",i,j,i*j);
    }
  }
  return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
#define FOR(i, s, n) for(int i = s; i < (int)n; i++)
#define per(i, n) for(int i = n; i >= 0; i--)
#define ROF(i, s, n) for(int i = s; i >= (int)n; i--)
#define FORIT(i, A) for (auto i : A)
#define PRINT(x) cout << (x) << "\n"
#define ALL(a) (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define MP make_pair
#define EACH(i, n) for (__typeof((n).begin()) i = (n).begin(); i != (n).end(); ++i)
#define SZ(a) int((a).size())
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())
#define CLR(a) memset((a), 0 ,sizeof(a))
#define NCLR(a) memset((a), -1 ,sizeof(a))
#define dump(x) cout << #x << " = " << (x) << "\n";
#define debug(x) cout << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << "\n";
#define sq(n) (n) * (n)
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long LL;
typedef vector<LL> VLL;
typedef vector<VLL> VVLL;
typedef unsigned int uint;
typedef unsigned long long ull;
typedef priority_queue<int> maxpq;
typedef priority_queue< int, vector<int>, greater<int> > minpq;
typedef complex<double> P;
static const double EPS = 1e-10;
static const double PI = acos( -1.0 );
static const int mod = 1000000007;
static const int INF = 1 << 29;
static const LL LL_INF = 1152921504606846976;
static const int dx[] = { -1, 0, 1, 0, 1, -1, 1, -1 };
static const int dy[] = { 0, -1, 0, 1, 1, 1, -1, -1 };


int main() {
#ifdef _DEBUG
	printf( "debug\n" );
#endif
	for ( int i = 1; i < 10; i++ ) {
		for ( int j = 1; j < 10; j++ ) {
			printf( "%d x%d=%d\n", i, j, i * j );
		}
	}
	return 0;
}

C++: #include <iostream>
using namespace std;
int main() {
 for (int i=1;i<10; i++) for (int j=1;j<10; j++) cout << i << "x" << j << "=" << i*j << endl;
 return 0;
}

C++: i;main(j){for(i=1;i<=9;i++)for(j=1;j<=9;j++)printf("%dx%d=%d\n",i,j,i*j);}

C++: #include<stdin.h>
using namespace std;

int main(){
    for (int i=1; i<=9; c++){
        for (int j=1; j<=9; j++){
            printf("%dx%d=%d",i,j,i*j)
        }
    }
    return 0;
}

C++: #include<stdio.h>

int main(void){
	int a,b,c;
	for(a=1;a<=9;a++){
		for(b=1;b<=9;b++){
			c=a*b;
			printf("%dx%d=%d,a,b,c);
		}
	}

    return 0;
}

C++: #include<stdio.h>

int main(){
int i,j;
for(i=0;i<=9;i++)
for(j=0;j<=9;j++)
printf("%d×%d=%d\n",i,j,i*j);
    return 0;
}

C++: #include <bits/stdc++.h>

using namespace std;

int main(){
    for(int i = 1; i < 10; i++){
        for(int j = 1; j < 10 ; j++){
            cout << i << "x" << j << "=" << i * j;
            if(i * j != 81){
                cout <<endl;
            }
        }
    }
    return 0;
}

C++: include<stdio.h>
int main(){
  int i,j;
  for(i=1;i<=9;i++){
    for(j=1;j<=9;j++){
      printf("%d×%d=%d\n",i,j,i*j);
    }
  }
  return 0;
}

C++: #include<iostream>

using namespace std;

int main(){

for(int i=1;i<10;i++)for(int j=1;j<10;j++)cout<<i<<"*"<<j<<"="<<i*j<<endl;
}

C++: #include<iostream>

using namespace std;

int main(void){
  for(int i = 1;i < 10;i++){
    for(int j = 1;j < 10;j++){
      cout << i << 'x' << j << '=' <<i * j << "\n"; 
    }
  }
  return 0;
}

C++: #include <iostream>
using namespace std;

int main() {
    for (int i = 1; i <= 9; i++) {
        for (int j = 1; j <= 9; j++) {
            cout << i << "x" << j << "=" << i * j << endl;
        }
    }
    return 0;
}

C++: #include<iostream>
using namespace std;

int main(){
    for(int i=1;i<10;i++){
        for(int j=1;j<10;j++){
            cout << i << 'x' << j << '=' << i*j << endl;
        }
    }
    return 0;
}

C++: #include <iostream>
using namespace std;

int main(void)
{
	for (int i = 1; i <= 9; i++)
	{
		for (int j = 1; j <= 9; j++)
		{
			cout << i << "x" << j << "=" << i * j << endl;
		}
	}
	return 0;
}

C++: #include <iostream>
using namespase std;

int main(){


for(int i=1;i<=9;i++){
 for(int j=1;j<=9;j++){
cout <<ixj=i*j;
 }
}

return 0;
}

C++: #include<iostream>
using namespace std;

int main()
{
	int a;
	int b;
	for (a=1,a<10,a++) {
		for (b=1,b<10,b++) {
			cout << a << "x" << b << "=" << a*b << endl;
		}
	}
	return 0;
}