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

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

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.v: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.t: G = None
        self.s: B = None
        self.v: B = None
        self.z: H = None
        self.u: C = None
        self.q: C = None
        self.w: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.r: F = None
        self.v: C = None
        self.z: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

a = A("a")
n = B("n")
j = C("j")
d = D("d")
e = E("e")
f = F("f")
l = G("l")
i = H("i")
c = E("c")
m = B("m")

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

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

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.v: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.t: G = None
        self.s: B = None
        self.v: B = None
        self.z: H = None
        self.u: C = None
        self.q: C = None
        self.w: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.r: F = None
        self.v: C = None
        self.z: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

a = A("a")
n = B("n")
j = C("j")
d = D("d")
e = E("e")
f = F("f")
l = G("l")
i = H("i")
c = E("c")
m = B("m")

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