class A:
    def __init__(self, txt: str):
        self.q: C = None
        self.y: E = None
        self.u: C = None
        self.v: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.x: F = None
        self.u: D = None
        self.p: B = None
        self.y: E = None
        self.t: E = None
        self.s: F = None
        self.txt = txt

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

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

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

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

h = A("h")
m = B("m")
i = C("i")
k = D("k")
d = E("d")
f = F("f")
c = G("c")
a = F("a")
e = B("e")
n = G("n")

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

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

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.x: F = None
        self.u: D = None
        self.p: B = None
        self.y: E = None
        self.t: E = None
        self.s: F = None
        self.txt = txt

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

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

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

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

h = A("h")
m = B("m")
i = C("i")
k = D("k")
d = E("d")
f = F("f")
c = G("c")
a = F("a")
e = B("e")
n = G("n")

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