class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.r: C = None
        self.y: F = None
        self.s: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.w: J = None
        self.u: H = None
        self.t: J = None
        self.y: F = None
        self.p: H = None
        self.r: I = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: I = None
        self.p: F = None
        self.y: I = None
        self.t: A = None
        self.x: H = None
        self.q: E = None
        self.v: J = None
        self.txt = txt

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

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

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

j = A("j")
l = B("l")
f = C("f")
h = D("h")
m = E("m")
n = F("n")
i = G("i")
k = H("k")
d = I("d")
g = J("g")

j.v = f
j.r = f
j.s = f
j.y = n
l.u = i
f.r = g
h.s = m
h.w = g
h.t = g
h.u = k
h.p = k
h.y = n
h.r = d
m.q = l
m.r = i
m.w = h
n.y = f
n.x = f
n.w = f
n.p = h
n.u = l
n.v = m
n.t = m
n.s = m
n.r = g
n.z = k
i.s = d
i.y = d
i.p = n
i.t = j
i.x = k
i.q = m
i.v = g
k.r = i
k.q = n
d.w = k
d.y = k
d.t = k
d.r = m
d.u = i
d.z = i
d.q = i
g.p = l
g.x = n
g.v = n
g.s = n
g.o = n
g.w = j
g.u = d
g.q = i
g.z = f
g.y = h
assert m.w.r.y.r.txt == "
class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.r: C = None
        self.y: F = None
        self.s: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.w: J = None
        self.u: H = None
        self.t: J = None
        self.y: F = None
        self.p: H = None
        self.r: I = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: I = None
        self.p: F = None
        self.y: I = None
        self.t: A = None
        self.x: H = None
        self.q: E = None
        self.v: J = None
        self.txt = txt

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

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

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

j = A("j")
l = B("l")
f = C("f")
h = D("h")
m = E("m")
n = F("n")
i = G("i")
k = H("k")
d = I("d")
g = J("g")

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