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

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

class C:
    def __init__(self, txt: str):
        self.w: J = None
        self.q: D = None
        self.s: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.v: B = None
        self.p: A = None
        self.w: C = None
        self.y: H = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: G = None
        self.txt = txt

m = A("m")
f = B("f")
k = C("k")
b = D("b")
n = E("n")
c = F("c")
l = G("l")
g = H("g")
e = I("e")
j = J("j")

m.z = c
m.t = c
m.s = j
m.q = g
m.y = g
m.v = k
m.u = k
m.r = b
m.p = l
m.w = f
f.v = m
f.q = b
k.w = j
k.q = b
k.s = m
b.o = n
b.r = l
n.s = b
n.v = f
n.p = m
n.w = k
n.y = g
c.p = g
c.v = l
l.z = n
l.u = g
l.s = e
g.t = k
g.u = j
e.y = l
j.v = l
assert j.v.z.p.r.r.s.y.s.txt == "
class A:
    def __init__(self, txt: str):
        self.z: F = None
        self.s: J = None
        self.q: H = None
        self.v: C = None
        self.u: C = None
        self.y: H = None
        self.t: F = None
        self.r: D = None
        self.p: G = None
        self.w: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: J = None
        self.q: D = None
        self.s: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.v: B = None
        self.p: A = None
        self.w: C = None
        self.y: H = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: G = None
        self.txt = txt

m = A("m")
f = B("f")
k = C("k")
b = D("b")
n = E("n")
c = F("c")
l = G("l")
g = H("g")
e = I("e")
j = J("j")

m.z = c
m.t = c
m.s = j
m.q = g
m.y = g
m.v = k
m.u = k
m.r = b
m.p = l
m.w = f
f.v = m
f.q = b
k.w = j
k.q = b
k.s = m
b.o = n
b.r = l
n.s = b
n.v = f
n.p = m
n.w = k
n.y = g
c.p = g
c.v = l
l.z = n
l.u = g
l.s = e
g.t = k
g.u = j
e.y = l
j.v = l
assert j.v.z.p.r.r.s.y.s.txt == "e"