#include<bits/stdc++.h>
#define fi first
#define se second
#define rep(i, n) for(int (i) = 0; (i) < (n); (i)++)
#define rrep(i, n) for (int (i) = 1; (i) <= (n); (i++))
#define rng(a) a.begin(),a.end()
#define rrng(a) a.rbegin(),a.rend()
#define pb push_back
#define eb emplace_back
#define yn {puts("Yes");}else {puts("No");}
#define printd(x) printf("%.12f\n", ans);
template<class T> bool chmin(T& a, const T& b) {if (a > b) {a = b; return 1;} return 0;}
template<class T> bool chmax(T& a, const T& b) {if (a < b) {a = b; return 1;} return 0;}
using namespace std;
using ll = long long;
using P = pair<int, int>;

int main(void) {
    ll a, b, k;
    cin >> a >> b >> k;

    rep (i, k) {
        if (i % 2 == 0) {
            if (a % 2 == 1) {
                a--;
            }
            a /= 2;
            b += a;
        }
        else {
            if ( b % 2) {
                b--;
            }
            b /= 2;
            a += b;
        }
    }
    cout << a << " " << b << endl;
    return 0;
}
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

const ll N = 4e5 + 5;
const ll mod = 998244353;

ll fac[N], inv[N];

ll power(ll x, ll y)
{
    ll res = 1;
    while (y)
    {
        if (y & 1)
            res = res * x % mod;
        x = x * x % mod;
        y >>= 1;
    }
    return res;
}

void init()
{
    fac[0] = inv[0] = 1;
    for (ll i = 1; i < N; i++)
    {
        fac[i] = i * fac[i - 1] % mod;
        inv[i] = power(fac[i], mod - 2);
    }
}

ll ncr(ll n, ll r)
{
    if (r < 0 || r > n)
        return 0;
    return fac[n] * inv[r] % mod * inv[n - r] % mod;
}
// https://betrue12.hateblo.jp/entry/2020/05/11/093054
signed main()
{
    init();

    ll n, m, k;
    cin >> n >> m >> k;

    ll ans = 0;
    for (ll i = 0; i <= k; i++)
    {
        ll curr = ncr(n - 1, i) * m % mod * power(m - 1, n - 1 - i) % mod;
        ans = (ans + curr) % mod;
    }
    cout << ans << endl;
    return 0;
}