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

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

class C:
    def __init__(self, txt: str):
        self.t: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.r: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.u: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: B = None
        self.q: F = None
        self.v: J = None
        self.o: I = None
        self.y: E = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.q: E = None
        self.w: F = None
        self.x: I = None
        self.p: I = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.r: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.u: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: B = None
        self.q: F = None
        self.v: J = None
        self.o: I = None
        self.y: E = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.q: E = None
        self.w: F = None
        self.x: I = None
        self.p: I = None
        self.txt = txt

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

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