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

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

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

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.q: E = None
        self.o: E = None
        self.x: D = None
        self.t: B = None
        self.s: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.t: D = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.q: E = None
        self.o: E = None
        self.x: D = None
        self.t: B = None
        self.s: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.t: D = None
        self.txt = txt

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

b.x = k
h.v = e
h.y = e
h.q = j
d.w = c
c.u = e
c.q = m
c.o = m
c.x = k
c.t = h
c.s = d
j.u = c
e.z = h
e.t = c
a.w = k
k.u = e
k.q = m
k.o = j
k.x = c
k.t = h
k.s = a
m.u = c
assert e.t.o.u.u.t.t.v.t.t.txt == "h"