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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: F = None
        self.u: D = None
        self.p: A = None
        self.v: C = None
        self.x: B = None
        self.w: D = None
        self.txt = txt

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

n = A("n")
a = B("a")
f = C("f")
j = D("j")
d = E("d")
l = F("l")
e = E("e")

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: F = None
        self.u: D = None
        self.p: A = None
        self.v: C = None
        self.x: B = None
        self.w: D = None
        self.txt = txt

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

n = A("n")
a = B("a")
f = C("f")
j = D("j")
d = E("d")
l = F("l")
e = E("e")

n.t = d
a.z = f
a.x = f
a.o = l
a.u = l
a.t = j
a.s = e
f.v = d
f.w = d
f.y = j
j.w = a
j.q = l
j.p = l
j.u = f
j.z = f
j.s = n
d.r = l
d.u = j
d.w = j
d.p = n
d.v = f
d.x = a
l.y = j
l.s = f
l.p = a
e.r = l
e.u = j
e.w = j
e.p = n
e.v = f
e.x = a
assert j.u.y.w.txt == "a"