class A:
    def __init__(self, txt: str):
        self.y: E = None
        self.o: C = None
        self.r: B = None
        self.p: I = None
        self.q: F = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.x: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

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

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.x: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

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

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

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

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

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