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

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

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.t: D = None
        self.y: A = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.u: B = None
        self.q: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: G = None
        self.z: E = None
        self.txt = txt

h = A("h")
k = B("k")
i = C("i")
m = D("m")
n = E("n")
j = F("j")
c = G("c")
a = H("a")
g = E("g")
f = F("f")

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

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

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.t: D = None
        self.y: A = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.u: B = None
        self.q: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: G = None
        self.z: E = None
        self.txt = txt

h = A("h")
k = B("k")
i = C("i")
m = D("m")
n = E("n")
j = F("j")
c = G("c")
a = H("a")
g = E("g")
f = F("f")

h.q = i
h.t = n
h.p = c
k.x = m
k.s = m
k.w = h
k.v = h
k.q = f
k.z = g
i.v = a
i.t = m
i.y = h
m.z = h
n.v = a
n.p = a
n.u = a
n.q = m
j.y = f
j.t = f
j.z = f
j.x = h
j.p = a
j.u = c
c.v = g
c.u = k
c.q = m
a.s = c
a.z = n
g.v = a
g.p = a
g.u = a
g.q = m
f.y = j
f.t = j
f.z = j
f.x = h
f.p = a
f.u = c
assert i.t.z.t.u.s.v.v.z.q.z.txt == "h"