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

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

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

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.w: E = None
        self.x: E = None
        self.s: D = None
        self.y: C = None
        self.txt = txt

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

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

k = A("k")
a = B("a")
e = C("e")
j = D("j")
l = E("l")
n = F("n")
g = D("g")
b = B("b")

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

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

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

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.w: E = None
        self.x: E = None
        self.s: D = None
        self.y: C = None
        self.txt = txt

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

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

k = A("k")
a = B("a")
e = C("e")
j = D("j")
l = E("l")
n = F("n")
g = D("g")
b = B("b")

k.q = e
k.z = e
k.y = n
k.o = n
k.w = l
k.t = b
a.z = b
a.p = e
e.p = j
e.q = g
e.x = n
e.u = a
j.t = b
j.w = l
j.x = l
j.s = g
j.y = e
l.v = e
l.o = e
n.w = a
n.y = b
n.z = j
n.t = e
g.t = a
g.w = l
g.x = l
g.s = j
g.y = e
b.z = a
b.p = e
assert k.o.y.z.p.x.z.txt == "j"