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

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

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.u: H = None
        self.w: B = None
        self.t: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.x: D = None
        self.r: B = None
        self.u: F = None
        self.p: A = None
        self.t: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.u: H = None
        self.w: B = None
        self.t: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.x: D = None
        self.r: B = None
        self.u: F = None
        self.p: A = None
        self.t: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

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

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