class A:
    def __init__(self, txt: str):
        self.t: D = None
        self.x: C = None
        self.s: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

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

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

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

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

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