class A:
    def __init__(self, txt: str):
        self.t: C = None
        self.v: F = None
        self.y: E = None
        self.z: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.o: C = None
        self.q: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.t: A = None
        self.y: F = None
        self.q: B = None
        self.z: D = None
        self.p: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.y: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.o: D = None
        self.t: C = None
        self.w: A = None
        self.z: C = None
        self.u: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

l = A("l")
b = B("b")
h = C("h")
j = D("j")
n = E("n")
a = F("a")
m = E("m")

l.t = h
l.v = a
l.y = n
l.z = b
b.r = l
b.o = h
b.q = n
h.o = l
h.t = l
h.p = l
h.y = a
h.q = b
h.z = j
j.w = l
j.y = a
n.p = b
n.u = b
n.o = j
n.t = h
n.z = h
n.w = l
a.w = j
m.p = b
m.u = b
m.o = j
m.t = h
m.z = h
m.w = l
assert h.q.r.y.o.w.y.u.txt == "
class A:
    def __init__(self, txt: str):
        self.t: C = None
        self.v: F = None
        self.y: E = None
        self.z: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.o: C = None
        self.q: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.t: A = None
        self.y: F = None
        self.q: B = None
        self.z: D = None
        self.p: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.y: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.o: D = None
        self.t: C = None
        self.w: A = None
        self.z: C = None
        self.u: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

l = A("l")
b = B("b")
h = C("h")
j = D("j")
n = E("n")
a = F("a")
m = E("m")

l.t = h
l.v = a
l.y = n
l.z = b
b.r = l
b.o = h
b.q = n
h.o = l
h.t = l
h.p = l
h.y = a
h.q = b
h.z = j
j.w = l
j.y = a
n.p = b
n.u = b
n.o = j
n.t = h
n.z = h
n.w = l
a.w = j
m.p = b
m.u = b
m.o = j
m.t = h
m.z = h
m.w = l
assert h.q.r.y.o.w.y.u.txt == "b"