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

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

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

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.q: G = None
        self.w: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.v: B = None
        self.z: A = None
        self.p: C = None
        self.s: G = None
        self.x: B = None
        self.y: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: G = None
        self.u: B = None
        self.w: A = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.q: G = None
        self.w: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.v: B = None
        self.z: A = None
        self.p: C = None
        self.s: G = None
        self.x: B = None
        self.y: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: G = None
        self.u: B = None
        self.w: A = None
        self.txt = txt

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

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

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