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

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.o: C = None
        self.q: C = None
        self.x: F = None
        self.y: C = 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.r: A = None
        self.y: F = None
        self.txt = txt

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

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

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

j.z = d
j.o = k
j.r = b
h.s = k
h.o = i
h.q = i
h.y = i
h.x = a
i.u = j
d.r = j
d.y = a
c.x = j
c.u = a
c.p = h
c.y = h
a.y = c
a.t = i
g.x = j
g.u = a
g.p = h
g.y = h
b.x = j
b.u = a
b.p = h
b.y = h
k.x = j
k.u = a
k.p = h
k.y = h
assert h.y.u.z.r.o.txt == "
class A:
    def __init__(self, txt: str):
        self.z: D = None
        self.o: E = None
        self.r: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.o: C = None
        self.q: C = None
        self.x: F = None
        self.y: C = 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.r: A = None
        self.y: F = None
        self.txt = txt

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

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

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

j.z = d
j.o = k
j.r = b
h.s = k
h.o = i
h.q = i
h.y = i
h.x = a
i.u = j
d.r = j
d.y = a
c.x = j
c.u = a
c.p = h
c.y = h
a.y = c
a.t = i
g.x = j
g.u = a
g.p = h
g.y = h
b.x = j
b.u = a
b.p = h
b.y = h
k.x = j
k.u = a
k.p = h
k.y = h
assert h.y.u.z.r.o.txt == "k"