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

class B:
    def __init__(self, txt: str):
        self.r: I = None
        self.v: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.t: B = None
        self.p: J = None
        self.s: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.q: H = None
        self.z: I = None
        self.o: E = None
        self.u: A = None
        self.v: A = None
        self.p: C = None
        self.s: E = None
        self.t: F = None
        self.r: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: I = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.u: E = None
        self.y: A = None
        self.q: F = None
        self.t: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: I = None
        self.v: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.t: B = None
        self.p: J = None
        self.s: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.q: H = None
        self.z: I = None
        self.o: E = None
        self.u: A = None
        self.v: A = None
        self.p: C = None
        self.s: E = None
        self.t: F = None
        self.r: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: I = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.u: E = None
        self.y: A = None
        self.q: F = None
        self.t: D = None
        self.txt = txt

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

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

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