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

class B:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.r: B = None
        self.z: G = None
        self.v: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.y: D = None
        self.q: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.p: C = None
        self.o: B = None
        self.r: E = None
        self.q: A = None
        self.t: H = None
        self.x: D = None
        self.w: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.t: C = None
        self.u: G = None
        self.y: E = None
        self.w: F = None
        self.v: B = None
        self.o: A = None
        self.s: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.r: B = None
        self.z: G = None
        self.v: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.y: D = None
        self.q: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.p: C = None
        self.o: B = None
        self.r: E = None
        self.q: A = None
        self.t: H = None
        self.x: D = None
        self.w: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.t: C = None
        self.u: G = None
        self.y: E = None
        self.w: F = None
        self.v: B = None
        self.o: A = None
        self.s: F = None
        self.txt = txt

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

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