class A:
    def __init__(self, txt: str):
        self.o: F = None
        self.w: D = None
        self.q: E = None
        self.z: E = None
        self.s: F = None
        self.p: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: G = None
        self.w: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.w: C = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.x: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.p: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

h = A("h")
k = B("k")
n = C("n")
d = D("d")
j = E("j")
f = F("f")
b = G("b")
i = C("i")
l = C("l")
a = F("a")

h.o = a
h.s = a
h.w = d
h.p = d
h.q = j
h.z = j
k.y = b
k.w = b
n.t = j
n.w = l
d.s = h
j.t = l
j.x = b
f.w = b
f.p = k
b.o = h
i.t = j
i.w = n
l.t = j
l.w = n
a.w = b
a.p = k
assert b.o.s.p.w.o.z.t.t.t.txt == "
class A:
    def __init__(self, txt: str):
        self.o: F = None
        self.w: D = None
        self.q: E = None
        self.z: E = None
        self.s: F = None
        self.p: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: G = None
        self.w: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.w: C = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.x: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.p: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

h = A("h")
k = B("k")
n = C("n")
d = D("d")
j = E("j")
f = F("f")
b = G("b")
i = C("i")
l = C("l")
a = F("a")

h.o = a
h.s = a
h.w = d
h.p = d
h.q = j
h.z = j
k.y = b
k.w = b
n.t = j
n.w = l
d.s = h
j.t = l
j.x = b
f.w = b
f.p = k
b.o = h
i.t = j
i.w = n
l.t = j
l.w = n
a.w = b
a.p = k
assert b.o.s.p.w.o.z.t.t.t.txt == "l"