class A:
    def __init__(self, txt: str):
        self.s: G = None
        self.x: F = None
        self.y: H = None
        self.r: G = None
        self.w: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: J = None
        self.o: I = None
        self.x: D = None
        self.q: J = None
        self.s: F = None
        self.t: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.o: E = None
        self.p: I = None
        self.r: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.v: I = None
        self.y: A = None
        self.q: E = None
        self.u: A = None
        self.r: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: B = None
        self.t: I = None
        self.z: G = None
        self.y: J = None
        self.v: D = None
        self.q: G = None
        self.s: G = None
        self.o: F = None
        self.w: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: J = None
        self.o: I = None
        self.x: D = None
        self.q: J = None
        self.s: F = None
        self.t: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.o: E = None
        self.p: I = None
        self.r: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.v: I = None
        self.y: A = None
        self.q: E = None
        self.u: A = None
        self.r: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: B = None
        self.t: I = None
        self.z: G = None
        self.y: J = None
        self.v: D = None
        self.q: G = None
        self.s: G = None
        self.o: F = None
        self.w: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

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

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

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