import random


def generate():
    world = (
            [["red_flower" if random.random() > 0.93 and y == 9 else "air" for _ in range(500)] for y in range(10)] +
            [["grass" for _ in range(500)] for _ in range(1)] +
            [["dirt" for _ in range(500)] for _ in range(9)] +
            [["stone" if random.random() < 0.94 else "iron" for _ in range(500)] for _ in range(10)]
    )

    for y in range(len(world)):
        for x in range(len(world[y])):
            if y == 6:
                if random.random() > 0.93:
                    if world[y][x] == "air":
                        try:
                            world[y][x] = "leaf"
                            world[y-1][x] = "leaf"
                            world[y][x-1] = "leaf"
                            world[y][x+1] = "leaf"
                            world[y+1][x] = "raw_wood"
                            world[y+2][x] = "raw_wood"
                            world[y+3][x] = "raw_wood"
                        except IndexError:
                            pass

    return world