class A:
    def __init__(self, txt: str):
        self.w: I = None
        self.t: E = None
        self.r: D = None
        self.q: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.u: H = None
        self.y: G = None
        self.q: C = None
        self.z: J = None
        self.p: J = None
        self.v: J = None
        self.o: A = None
        self.x: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.v: F = None
        self.p: D = None
        self.x: A = None
        self.s: H = None
        self.q: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.q: C = None
        self.s: C = None
        self.w: C = None
        self.y: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: I = None
        self.z: G = None
        self.r: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: E = None
        self.s: A = None
        self.o: F = None
        self.v: B = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.u: H = None
        self.y: G = None
        self.q: C = None
        self.z: J = None
        self.p: J = None
        self.v: J = None
        self.o: A = None
        self.x: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.v: F = None
        self.p: D = None
        self.x: A = None
        self.s: H = None
        self.q: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.q: C = None
        self.s: C = None
        self.w: C = None
        self.y: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: I = None
        self.z: G = None
        self.r: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: E = None
        self.s: A = None
        self.o: F = None
        self.v: B = None
        self.txt = txt

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

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

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