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

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

class C:
    def __init__(self, txt: str):
        self.t: C = None
        self.v: E = None
        self.p: C = None
        self.u: C = None
        self.x: D = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: C = None
        self.v: E = None
        self.p: C = None
        self.u: C = None
        self.x: D = None
        self.txt = txt

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

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

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

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

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