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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.o: D = None
        self.y: C = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.o: D = None
        self.y: C = None
        self.txt = txt

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

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