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

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

class C:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.v: D = None
        self.p: A = None
        self.r: F = None
        self.q: E = None
        self.t: F = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.v: D = None
        self.p: A = None
        self.r: F = None
        self.q: E = None
        self.t: F = None
        self.txt = txt

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

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

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