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

class B:
    def __init__(self, txt: str):
        self.o: J = None
        self.w: F = None
        self.v: E = None
        self.u: C = None
        self.p: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: J = None
        self.y: I = None
        self.o: H = None
        self.w: J = None
        self.x: G = None
        self.u: J = None
        self.v: H = None
        self.z: J = None
        self.t: G = None
        self.s: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.q: I = None
        self.r: A = None
        self.w: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: A = None
        self.x: I = None
        self.z: B = None
        self.y: J = None
        self.t: B = None
        self.s: F = None
        self.q: J = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.o: B = None
        self.p: J = None
        self.s: G = None
        self.q: J = None
        self.y: F = None
        self.v: D = None
        self.w: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: G = None
        self.q: E = None
        self.u: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: J = None
        self.w: F = None
        self.v: E = None
        self.u: C = None
        self.p: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: J = None
        self.y: I = None
        self.o: H = None
        self.w: J = None
        self.x: G = None
        self.u: J = None
        self.v: H = None
        self.z: J = None
        self.t: G = None
        self.s: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.q: I = None
        self.r: A = None
        self.w: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: A = None
        self.x: I = None
        self.z: B = None
        self.y: J = None
        self.t: B = None
        self.s: F = None
        self.q: J = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.o: B = None
        self.p: J = None
        self.s: G = None
        self.q: J = None
        self.y: F = None
        self.v: D = None
        self.w: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: G = None
        self.q: E = None
        self.u: D = None
        self.txt = txt

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

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