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

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

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.t: A = None
        self.x: F = None
        self.z: H = None
        self.r: G = None
        self.v: G = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.o: J = None
        self.u: F = None
        self.s: D = None
        self.v: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: J = None
        self.u: G = None
        self.r: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: A = None
        self.x: F = None
        self.p: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.t: A = None
        self.x: F = None
        self.z: H = None
        self.r: G = None
        self.v: G = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.o: J = None
        self.u: F = None
        self.s: D = None
        self.v: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: J = None
        self.u: G = None
        self.r: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: A = None
        self.x: F = None
        self.p: E = None
        self.txt = txt

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

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