import java.util.Random;

public class Program {
    public static void main(String[] args) {
    }
    
    public static int random5() {
        return new Random().nextInt(5) + 1;
    }

    public static int random7() {
        int val = random5() * 5 + random5();
        return val > 21 ? random7() : val % 7 + 1;
    }
}

@@ -235,16 +235,17 @@
 t val = 
+(
 random5(
@@ -245,16 +245,21 @@
 andom5()
+ - 1)
  * 5 + r

Fix random7 implementation to generate values 1-25 instead of 6-30