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

class B:
    def __init__(self, txt: str):
        self.s: J = None
        self.q: D = None
        self.z: H = None
        self.u: D = None
        self.v: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.q: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: D = None
        self.v: E = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: J = None
        self.q: D = None
        self.z: H = None
        self.u: D = None
        self.v: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.q: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: D = None
        self.v: E = None
        self.txt = txt

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

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

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