class A:
    def __init__(self, txt: str):
        self.s: F = None
        self.v: E = None
        self.w: E = None
        self.z: H = None
        self.r: I = None
        self.o: D = None
        self.t: B = None
        self.p: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.r: E = None
        self.p: D = None
        self.x: H = None
        self.q: I = None
        self.y: I = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.z: J = None
        self.q: A = None
        self.r: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: J = None
        self.y: I = None
        self.q: J = None
        self.r: I = None
        self.s: A = None
        self.x: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: A = None
        self.t: E = None
        self.q: J = None
        self.z: A = None
        self.y: B = None
        self.w: C = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.y: C = None
        self.s: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.r: E = None
        self.p: D = None
        self.x: H = None
        self.q: I = None
        self.y: I = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.z: J = None
        self.q: A = None
        self.r: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: J = None
        self.y: I = None
        self.q: J = None
        self.r: I = None
        self.s: A = None
        self.x: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: A = None
        self.t: E = None
        self.q: J = None
        self.z: A = None
        self.y: B = None
        self.w: C = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.y: C = None
        self.s: D = None
        self.txt = txt

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

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