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

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

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: G = None
        self.v: C = None
        self.s: H = None
        self.t: H = None
        self.y: B = None
        self.q: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.p: E = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: G = None
        self.v: C = None
        self.s: H = None
        self.t: H = None
        self.y: B = None
        self.q: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.p: E = None
        self.txt = txt

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

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

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

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