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

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

class C:
    def __init__(self, txt: str):
        self.t: H = None
        self.r: D = None
        self.z: J = None
        self.w: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.v: C = None
        self.y: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.z: I = None
        self.o: B = None
        self.r: I = None
        self.x: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.x: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.o: E = None
        self.t: G = None
        self.u: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.u: A = None
        self.v: H = None
        self.y: B = None
        self.w: A = None
        self.o: A = None
        self.t: E = None
        self.x: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: H = None
        self.r: D = None
        self.z: J = None
        self.w: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.v: C = None
        self.y: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.z: I = None
        self.o: B = None
        self.r: I = None
        self.x: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.x: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.o: E = None
        self.t: G = None
        self.u: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.u: A = None
        self.v: H = None
        self.y: B = None
        self.w: A = None
        self.o: A = None
        self.t: E = None
        self.x: A = None
        self.txt = txt

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

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