class A:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.x: J = None
        self.w: I = None
        self.u: G = None
        self.v: F = None
        self.p: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: A = None
        self.r: J = None
        self.s: B = None
        self.u: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: E = None
        self.z: A = None
        self.x: B = None
        self.t: E = None
        self.p: D = None
        self.w: D = None
        self.r: A = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.t: A = None
        self.s: H = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.x: J = None
        self.w: I = None
        self.u: G = None
        self.v: F = None
        self.p: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: A = None
        self.r: J = None
        self.s: B = None
        self.u: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: E = None
        self.z: A = None
        self.x: B = None
        self.t: E = None
        self.p: D = None
        self.w: D = None
        self.r: A = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.t: A = None
        self.s: H = None
        self.txt = txt

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

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