Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with 5, 7 and 5 syllables, in this order.
Iroha is looking for X,Y,Z-Haiku (defined below) in integer sequences.
Consider all integer sequences of length N whose elements are between 1 and 10, inclusive. Out of those 10^N sequences, how many contain an X,Y,Z-Haiku?
Here, an integer sequence a_0, a_1, ..., a_{N-1} is said to contain an X,Y,Z-Haiku if and only if there exist four indices x, y, z, w (0 ≦ x < y < z < w ≦ N) such that all of the following are satisfied:
 - a_x + a_{x+1} + ... + a_{y-1} = X
 - a_y + a_{y+1} + ... + a_{z-1} = Y
 - a_z + a_{z+1} + ... + a_{w-1} = Z
Since the answer can be extremely large, print the number modulo 10^9+7.

-----Constraints-----
 - 3 ≦ N ≦ 40
 - 1 ≦ X ≦ 5
 - 1 ≦ Y ≦ 7
 - 1 ≦ Z ≦ 5

-----Input-----
The input is given from Standard Input in the following format:
N X Y Z

-----Output-----
Print the number of the sequences that contain an X,Y,Z-Haiku, modulo 10^9+7.

-----Sample Input-----
3 5 7 5

-----Sample Output-----
1

Here, the only sequence that contains a 5,7,5-Haiku is [5, 7, 5].

```python

USER_FILENAME = "<user_code>"
import sys, json, builtins
import math, heapq, bisect, itertools, functools, collections, statistics, fractions, decimal, operator, array, random, re, string, os, pathlib
try:
    import resource as _res
except Exception:
    _res = None
from collections import Counter, defaultdict, deque, OrderedDict
from functools import lru_cache, reduce
from itertools import accumulate, permutations, combinations, product
from math import gcd, ceil, floor, sqrt
from decimal import Decimal
try:
    from typing import *
except Exception:
    pass
try:
    sys.setrecursionlimit(1_000_000)
except Exception:
    pass
try:
    import site as _site
    try:
        _sys_sites = _site.getsitepackages() if hasattr(_site, "getsitepackages") else []
        for _p in _sys_sites:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
    try:
        _usp = _site.getusersitepackages()
        if isinstance(_usp, str):
            _usp = [_usp]
        for _p in _usp:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
except Exception:
    pass

ns = {"__name__": "__main__"}
for _k, _v in list(globals().items()):
    if not _k.startswith("_"):
        ns[_k] = _v
_CODE = '# coding: utf-8\n# Your code here!\nimport sys\nread = sys.stdin.read\nreadline = sys.stdin.readline\n\nn,X,Y,Z = list(map(int,read().split()))\n\nN = 1<<(X+Y+Z)\nNX = 1<<X\nNY = 1<<(X+Y)\nNZ = 1<<(X+Y+Z)\n\nMX = (1<<X) - 1\nMY = (1<<(Y+X)) - (1<<X)\nMZ = (1<<(X+Y+Z)) - (1<<(Y+X))\n\nMMX = MX<<1\nMMY = MY<<1\nMMZ = MZ<<1\n\ndp = [0]*N\ndp[1] = 1\n\nMOD = 10**9+7\n\nfor _ in range(n):\n    ndp = [0]*N\n    #cnt = 0\n    #bad = 0\n    for mask in range(N):\n        if dp[mask]==0: continue\n        mx = mask&MX\n        my = mask&MY\n        mz = mask&MZ\n        \n        for j in range(1,11):\n            nmx = mx << j\n            nmx &= MMX\n\n            nmy = my << j\n            nmy &= MMY\n\n            nmz = mz << j\n            nmz &= MMZ\n\n            nmask = nmx|nmy|nmz|1\n            if not nmask&(1<<(X+Y+Z)):\n                ndp[nmask] += dp[mask]\n                ndp[nmask] %= MOD\n\n    dp = ndp\n    #print(sum(dp),"sum")\n\nans = (pow(10,n,MOD)-sum(dp))\nprint((ans%MOD))\n\n\n'
_co = compile(_CODE, USER_FILENAME, "exec")
exec(_co, ns, ns)

```

Measured memory_bytes: 2103172