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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.v: B = None
        self.q: E = None
        self.s: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.y: D = None
        self.v: F = None
        self.z: A = None
        self.txt = txt

n = A("n")
f = B("f")
m = C("m")
a = D("a")
i = E("i")
l = F("l")
b = E("b")
c = F("c")
j = D("j")

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.v: B = None
        self.q: E = None
        self.s: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.y: D = None
        self.v: F = None
        self.z: A = None
        self.txt = txt

n = A("n")
f = B("f")
m = C("m")
a = D("a")
i = E("i")
l = F("l")
b = E("b")
c = F("c")
j = D("j")

n.w = i
n.z = i
n.q = m
n.u = a
n.p = a
n.v = b
f.p = l
f.o = j
f.q = i
m.s = f
m.o = c
m.u = j
m.q = a
m.z = n
m.r = n
a.x = i
a.s = l
a.q = f
i.p = j
i.v = f
i.q = b
i.s = n
l.t = n
l.z = n
l.y = j
l.v = c
b.p = j
b.v = f
b.q = i
b.s = n
c.t = n
c.z = n
c.y = j
c.v = l
j.x = b
j.s = c
j.q = f
assert f.q.p.s.t.u.s.t.txt == "n"