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

class B:
    def __init__(self, txt: str):
        self.o: H = None
        self.y: D = None
        self.z: D = None
        self.r: E = None
        self.t: A = None
        self.w: E = None
        self.s: H = None
        self.txt = txt

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

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.s: H = None
        self.txt = txt

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

c = A("c")
g = B("g")
l = C("l")
h = D("h")
b = E("b")
i = F("i")
a = G("a")
j = H("j")
e = I("e")
k = J("k")

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

class B:
    def __init__(self, txt: str):
        self.o: H = None
        self.y: D = None
        self.z: D = None
        self.r: E = None
        self.t: A = None
        self.w: E = None
        self.s: H = None
        self.txt = txt

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

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.s: H = None
        self.txt = txt

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

c = A("c")
g = B("g")
l = C("l")
h = D("h")
b = E("b")
i = F("i")
a = G("a")
j = H("j")
e = I("e")
k = J("k")

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