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

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.v: C = None
        self.t: E = None
        self.x: E = None
        self.r: J = None
        self.s: D = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.o: F = None
        self.y: B = None
        self.u: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: F = None
        self.r: H = None
        self.s: B = None
        self.t: C = None
        self.q: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: I = None
        self.z: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.v: C = None
        self.t: E = None
        self.x: E = None
        self.r: J = None
        self.s: D = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.o: F = None
        self.y: B = None
        self.u: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: F = None
        self.r: H = None
        self.s: B = None
        self.t: C = None
        self.q: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: I = None
        self.z: E = None
        self.txt = txt

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

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