How to solve them?
Q1) Bob finds a mystery box that contain three strings and a note with details of game, one string S filled with characters upto 10^5 length and the other two empty string A and B,
the game has possible two moves
game string S and A are empty, and whoever makes string be lexicographically smallest wins
bob needs your help to win the game
Q2)given a n-array a perfect tree with K levels will need to Mark each node of the tree with the number on dice such that the resulting tree is gambler friendly are trees gambler friendly if the following holds
for every node and tree let's say it is marked with number p, p and q are adjacent to each other
1<=p,q<=6
p!=q and a number is not adjacent to itself on dice
you need calculate the number of possible ways to mark the nodes of the tree such that it is gambler friendly. the number can be very large return modulo 10^9 + 7