using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Numerics;
namespace Tasks
{
using mint = E.ModuloInteger;
public class E
{
public static void Main()
{
using var sw = new StreamWriter(Console.OpenStandardOutput()) { AutoFlush = false };
Console.SetOut(sw);
Solve();
Console.Out.Flush();
}
public static void Solve()
{
var (N, M, K) = Scanner.Scan<int, int, int>();
var dp = new mint[K + 1, N + 1];
dp[0, 0] = 1;
for (var k = 0; k < K; k++)
{
for (var m = 1; m <= M; m++)
{
for (var n = 0; n < N; n++)
{
var x = n + m;
if (x > N) x = Math.Max(0, N - (x - N));
dp[k + 1, x] += dp[k, n] / M;
}
}
}
mint answer = 0;
for (var k = 0; k <= K; k++)
{
answer += dp[k, N];
}
Console.WriteLine(answer);
}
public readonly struct ModuloInteger : IEquatable<ModuloInteger>
{
public long Value { get; }
// The modulo will be used as an editable property.
// public static long Modulo { get; set; } = 998244353;
// The constant modulo will be recommended to use for performances in use cases.
public const long Modulo = 998244353;
public ModuloInteger(int value)
{
Value = value % Modulo;
if (Value < 0) Value += Modulo;
}
public ModuloInteger(long value)
{
Value = value % Modulo;
if (Value < 0) Value += Modulo;
}
public static implicit operator int(ModuloInteger mint) => (int)mint.Value;
public static implicit operator long(ModuloInteger mint) => mint.Value;
public static implicit operator ModuloInteger(int value) => new ModuloInteger(value);
public static implicit operator ModuloInteger(long value) => new ModuloInteger(value);
public static ModuloInteger operator +(ModuloInteger a, ModuloInteger b) => a.Value + b.Value;
public static ModuloInteger operator -(ModuloInteger a, ModuloInteger b) => a.Value - b.Value;
public static ModuloInteger operator *(ModuloInteger a, ModuloInteger b) => a.Value * b.Value;
public static ModuloInteger operator /(ModuloInteger a, ModuloInteger b) => a * b.Inverse();
public static bool operator ==(ModuloInteger a, ModuloInteger b) => a.Equals(b);
public static bool operator !=(ModuloInteger a, ModuloInteger b) => !a.Equals(b);
public bool Equals(ModuloInteger other) => Value == other.Value;
public override bool Equals(object obj) => obj is ModuloInteger other && Equals(other);
public override int GetHashCode() => Value.GetHashCode();
public override string ToString() => Value.ToString();
public ModuloInteger Inverse() => Inverse(Value);
public static ModuloInteger Inverse(long value)
{
if (value == 0) return 0;
var (s, t, m0, m1) = (Modulo, value, 0L, 1L);
while (t > 0)
{
var u = s / t;
s -= t * u;
m0 -= m1 * u;
(s, t) = (t, s);
(m0, m1) = (m1, m0);
}
if (m0 < 0) m0 += Modulo / s;
return m0;
}
public ModuloInteger Power(long n) => Power(Value, n);
public static ModuloInteger Power(long value, long n)
{
if (n < 0) throw new ArgumentException(nameof(n));
var result = 1L;
while (n > 0)
{
if ((n & 1) > 0) result = result * value % Modulo;
value = value * value % Modulo;
n >>= 1;
}
return result;
}
}
public static class Scanner
{
public static string ScanLine() => Console.ReadLine()?.Trim() ?? string.Empty;
public static string[] Scan() => ScanLine().Split(' ');
public static T Scan<T>() where T : IConvertible => Convert<T>(Scan()[0]);
public static (T1, T2) Scan<T1, T2>() where T1 : IConvertible where T2 : IConvertible
{
var line = Scan();
return (Convert<T1>(line[0]), Convert<T2>(line[1]));
}
public static (T1, T2, T3) Scan<T1, T2, T3>() where T1 : IConvertible where T2 : IConvertible where T3 : IConvertible
{
var line = Scan();
return (Convert<T1>(line[0]), Convert<T2>(line[1]), Convert<T3>(line[2]));
}
public static (T1, T2, T3, T4) Scan<T1, T2, T3, T4>() where T1 : IConvertible where T2 : IConvertible where T3 : IConvertible where T4 : IConvertible
{
var line = Scan();
return (Convert<T1>(line[0]), Convert<T2>(line[1]), Convert<T3>(line[2]), Convert<T4>(line[3]));
}
public static (T1, T2, T3, T4, T5) Scan<T1, T2, T3, T4, T5>() where T1 : IConvertible where T2 : IConvertible where T3 : IConvertible where T4 : IConvertible where T5 : IConvertible
{
var line = Scan();
return (Convert<T1>(line[0]), Convert<T2>(line[1]), Convert<T3>(line[2]), Convert<T4>(line[3]), Convert<T5>(line[4]));
}
public static (T1, T2, T3, T4, T5, T6) Scan<T1, T2, T3, T4, T5, T6>() where T1 : IConvertible where T2 : IConvertible where T3 : IConvertible where T4 : IConvertible where T5 : IConvertible where T6 : IConvertible
{
var line = Scan();
return (Convert<T1>(line[0]), Convert<T2>(line[1]), Convert<T3>(line[2]), Convert<T4>(line[3]), Convert<T5>(line[4]), Convert<T6>(line[5]));
}
public static IEnumerable<T> ScanEnumerable<T>() where T : IConvertible => Scan().Select(Convert<T>);
private static T Convert<T>(string value) where T : IConvertible => (T)System.Convert.ChangeType(value, typeof(T));
}
}
}