class A:
    def __init__(self, txt: str):
        self.q: D = None
        self.s: J = None
        self.r: H = None
        self.o: I = None
        self.x: I = None
        self.z: H = None
        self.y: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: J = None
        self.s: F = None
        self.x: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.t: E = None
        self.r: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: J = None
        self.q: C = None
        self.u: G = None
        self.p: A = None
        self.t: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.v: D = None
        self.q: D = None
        self.w: E = None
        self.s: B = None
        self.r: I = None
        self.o: B = None
        self.p: I = None
        self.x: H = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: J = None
        self.s: F = None
        self.x: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.t: E = None
        self.r: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: J = None
        self.q: C = None
        self.u: G = None
        self.p: A = None
        self.t: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.v: D = None
        self.q: D = None
        self.w: E = None
        self.s: B = None
        self.r: I = None
        self.o: B = None
        self.p: I = None
        self.x: H = None
        self.txt = txt

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

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