CF1970E1 Trails (Easy)

Description

Harry Potter is hiking in the Alps surrounding Lake Geneva. In this area there are $ m $ cabins, numbered 1 to $ m $ . Each cabin is connected, with one or more trails, to a central meeting point next to the lake. Each trail is either short or long. Cabin $ i $ is connected with $ s_i $ short trails and $ l_i $ long trails to the lake. Each day, Harry walks a trail from the cabin where he currently is to Lake Geneva, and then from there he walks a trail to any of the $ m $ cabins (including the one he started in). However, as he has to finish the hike in a day, at least one of the two trails has to be short. How many possible combinations of trails can Harry take if he starts in cabin 1 and walks for $ n $ days? Give the answer modulo $ 10^9 + 7 $ .

Input Format

N/A

Output Format

N/A