class A:
    def __init__(self, txt: str):
        self.w: E = None
        self.t: F = None
        self.s: F = None
        self.u: B = None
        self.z: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.s: A = None
        self.r: A = None
        self.t: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.u: B = None
        self.q: A = None
        self.r: A = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.s: A = None
        self.r: A = None
        self.t: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.u: B = None
        self.q: A = None
        self.r: A = None
        self.txt = txt

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

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

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

k.w = g
k.t = e
k.s = e
k.u = n
k.z = n
n.v = j
n.t = j
n.s = k
n.r = k
f.q = k
f.v = n
f.p = e
f.z = j
f.y = j
j.o = n
j.u = n
j.q = k
j.r = k
g.o = j
e.z = g
e.y = j
e.t = f
e.o = k
e.w = k
e.p = k
assert j.q.t.y.u.txt == "n"