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

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: E = None
        self.s: E = None
        self.z: D = None
        self.y: D = None
        self.o: E = None
        self.u: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

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

m.u = j
m.z = i
m.o = b
i.z = g
g.s = e
g.r = i
h.z = m
h.q = d
h.x = d
h.t = i
h.v = i
h.o = g
b.t = e
b.s = e
b.o = e
b.z = h
b.y = h
b.u = j
d.x = e
e.t = b
e.s = b
e.o = b
e.z = h
e.y = h
e.u = m
j.u = m
j.z = i
j.o = e
assert h.q.x.t.o.u.u.txt == "
class A:
    def __init__(self, txt: str):
        self.u: A = None
        self.z: B = None
        self.o: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: E = None
        self.s: E = None
        self.z: D = None
        self.y: D = None
        self.o: E = None
        self.u: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

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

m.u = j
m.z = i
m.o = b
i.z = g
g.s = e
g.r = i
h.z = m
h.q = d
h.x = d
h.t = i
h.v = i
h.o = g
b.t = e
b.s = e
b.o = e
b.z = h
b.y = h
b.u = j
d.x = e
e.t = b
e.s = b
e.o = b
e.z = h
e.y = h
e.u = m
j.u = m
j.z = i
j.o = e
assert h.q.x.t.o.u.u.txt == "j"