class A:
    def __init__(self, txt: str):
        self.s: J = None
        self.z: C = None
        self.y: B = None
        self.u: H = None
        self.o: J = None
        self.t: E = None
        self.q: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: G = None
        self.s: H = None
        self.x: C = None
        self.t: H = None
        self.q: A = None
        self.p: G = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: G = None
        self.s: H = None
        self.x: C = None
        self.t: H = None
        self.q: A = None
        self.p: G = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

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