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

class B:
    def __init__(self, txt: str):
        self.w: H = None
        self.s: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.y: C = None
        self.x: C = None
        self.u: F = None
        self.p: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.x: C = None
        self.t: B = None
        self.v: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: I = None
        self.s: E = None
        self.v: I = None
        self.o: G = None
        self.q: D = None
        self.t: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: G = None
        self.x: E = None
        self.r: E = None
        self.t: B = None
        self.y: F = None
        self.z: I = None
        self.u: E = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: H = None
        self.s: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.y: C = None
        self.x: C = None
        self.u: F = None
        self.p: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.x: C = None
        self.t: B = None
        self.v: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: I = None
        self.s: E = None
        self.v: I = None
        self.o: G = None
        self.q: D = None
        self.t: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: G = None
        self.x: E = None
        self.r: E = None
        self.t: B = None
        self.y: F = None
        self.z: I = None
        self.u: E = None
        self.txt = txt

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

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

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

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