class A:
    def __init__(self, txt: str):
        self.v: I = None
        self.q: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.w: G = None
        self.p: I = None
        self.v: C = None
        self.z: G = None
        self.t: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.s: I = None
        self.z: H = None
        self.w: A = None
        self.r: H = None
        self.u: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: E = None
        self.t: H = None
        self.y: C = None
        self.q: B = None
        self.z: J = None
        self.w: D = None
        self.r: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: J = None
        self.u: E = None
        self.r: H = None
        self.y: E = None
        self.x: B = None
        self.w: D = None
        self.z: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: J = None
        self.o: B = None
        self.u: G = None
        self.x: J = None
        self.p: F = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.w: G = None
        self.p: I = None
        self.v: C = None
        self.z: G = None
        self.t: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.s: I = None
        self.z: H = None
        self.w: A = None
        self.r: H = None
        self.u: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: E = None
        self.t: H = None
        self.y: C = None
        self.q: B = None
        self.z: J = None
        self.w: D = None
        self.r: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: J = None
        self.u: E = None
        self.r: H = None
        self.y: E = None
        self.x: B = None
        self.w: D = None
        self.z: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: J = None
        self.o: B = None
        self.u: G = None
        self.x: J = None
        self.p: F = None
        self.txt = txt

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

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

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

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