class A:
    def __init__(self, txt: str):
        self.v: G = None
        self.o: I = None
        self.s: F = None
        self.x: F = None
        self.q: H = None
        self.u: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: I = None
        self.y: B = None
        self.x: A = None
        self.u: D = None
        self.r: D = None
        self.t: C = None
        self.p: E = None
        self.w: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: D = None
        self.z: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: I = None
        self.y: B = None
        self.x: A = None
        self.u: D = None
        self.r: D = None
        self.t: C = None
        self.p: E = None
        self.w: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: D = None
        self.z: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

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

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