class A:
    def __init__(self, txt: str):
        self.o: D = None
        self.q: B = None
        self.u: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.v: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

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

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

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

b = A("b")
c = B("c")
d = C("d")
i = D("i")
m = E("m")
j = F("j")
k = B("k")
e = D("e")
a = F("a")
h = B("h")

b.o = e
b.u = e
b.q = h
c.q = i
c.v = m
d.u = b
i.u = e
i.s = e
i.p = e
m.u = d
j.p = h
j.y = a
k.q = i
k.v = m
e.u = i
e.s = i
e.p = i
a.p = h
a.y = j
h.q = i
h.v = m
assert e.s.u.p.s.s.u.p.u.u.u.txt == "
class A:
    def __init__(self, txt: str):
        self.o: D = None
        self.q: B = None
        self.u: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.v: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

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

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

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

b = A("b")
c = B("c")
d = C("d")
i = D("i")
m = E("m")
j = F("j")
k = B("k")
e = D("e")
a = F("a")
h = B("h")

b.o = e
b.u = e
b.q = h
c.q = i
c.v = m
d.u = b
i.u = e
i.s = e
i.p = e
m.u = d
j.p = h
j.y = a
k.q = i
k.v = m
e.u = i
e.s = i
e.p = i
a.p = h
a.y = j
h.q = i
h.v = m
assert e.s.u.p.s.s.u.p.u.u.u.txt == "e"