give positive integer n k binary string Sn form followsS1 0Si Si 1 1 reverseinvertsi 1 1Where denote concatenation operation reversex return reverse string x invertx invert bits x 0 change 1 1 change 0for example string sequence ares1 0s2 011s3 0111001s4 011100110110001return kth bit Sn it guarantee k valid give n Example 1input n 3 k 1output 0explanation S3 0111001the 1st bit 0example 2input n 4 k 11output 1explanation S4 011100110110001the 11th bit 1 constraints1 n 201 k 2n 1