class A:
    def __init__(self, txt: str):
        self.x: G = None
        self.o: I = None
        self.s: J = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.s: I = None
        self.u: H = None
        self.t: I = None
        self.w: D = None
        self.p: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: J = None
        self.q: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.y: C = None
        self.o: I = None
        self.z: C = None
        self.t: I = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.r: E = None
        self.t: D = None
        self.y: G = None
        self.txt = txt

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

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

k.x = d
k.o = f
k.s = a
l.z = d
l.p = d
l.s = f
l.t = f
l.u = e
l.w = g
c.w = d
c.u = a
c.y = l
c.t = l
c.p = e
c.r = n
c.s = h
g.t = a
g.q = f
n.s = h
n.y = c
n.z = c
n.o = f
n.t = f
h.t = d
d.p = f
d.s = l
d.q = l
d.x = a
d.r = a
d.z = h
d.w = h
d.y = c
d.o = k
d.v = e
e.t = l
e.x = l
f.r = n
f.t = g
f.y = d
a.t = g
assert k.o.t.t.t.q.t.q.r.txt == "
class A:
    def __init__(self, txt: str):
        self.x: G = None
        self.o: I = None
        self.s: J = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.s: I = None
        self.u: H = None
        self.t: I = None
        self.w: D = None
        self.p: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: J = None
        self.q: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.y: C = None
        self.o: I = None
        self.z: C = None
        self.t: I = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.r: E = None
        self.t: D = None
        self.y: G = None
        self.txt = txt

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

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

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