class A:
    def __init__(self, txt: str):
        self.t: D = None
        self.o: I = None
        self.r: I = None
        self.u: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.t: J = None
        self.o: H = None
        self.u: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: H = None
        self.w: E = None
        self.y: J = None
        self.z: E = None
        self.p: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.z: C = None
        self.s: E = None
        self.p: D = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.o: B = None
        self.w: J = None
        self.p: A = None
        self.y: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: H = None
        self.t: F = None
        self.x: B = None
        self.z: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.t: J = None
        self.o: H = None
        self.u: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: H = None
        self.w: E = None
        self.y: J = None
        self.z: E = None
        self.p: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.z: C = None
        self.s: E = None
        self.p: D = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.o: B = None
        self.w: J = None
        self.p: A = None
        self.y: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: H = None
        self.t: F = None
        self.x: B = None
        self.z: D = None
        self.txt = txt

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

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