package main

import (
    "bufio"
    "fmt"
    "os"
)

func main() {
    var next byte
    var buf = bufio.NewScanner(os.Stdin)
    for buf.Scan() {
        var b, t byte
        switch buf.Text() {
        case "white":
            b, t = 0x01, 0x03
        case "black":
            b, t = 0x02, 0x31
        case "purple":
            b, t = 0x04, 0x35
        case "red":
            b, t = 0x08, 0x2F
        case "green":
            b, t = 0x10, 0x1E
        case "orange":
            b, t = 0x20, 0x35
        default:
            continue
        }
        if next&b != 0 {
            fmt.Println("Boom")
            return
        }
        next = t
    }
    fmt.Println("Bomb defused")
}