diff --git a/buggy.py b/buggy.py
--- a/buggy.py
+++ b/buggy.py
@@ -13,7 +13,7 @@
 from operator import mul
 from functools import lru_cache
 
-mod = 10**9 + 7
+mod = 998244353
 sys.setrecursionlimit(2147483647)
 INF = 10**13
 
