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

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.z: H = None
        self.y: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.o: G = None
        self.q: E = None
        self.x: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: H = None
        self.o: C = None
        self.p: A = None
        self.y: D = None
        self.x: D = None
        self.q: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.w: B = None
        self.t: B = None
        self.v: A = None
        self.u: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.y: B = None
        self.w: F = None
        self.v: D = None
        self.z: A = None
        self.r: B = None
        self.o: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: D = None
        self.p: G = None
        self.w: A = None
        self.q: E = None
        self.u: B = None
        self.z: E = None
        self.x: G = None
        self.txt = txt

k = A("k")
n = B("n")
c = C("c")
b = D("b")
h = E("h")
g = F("g")
a = G("a")
l = H("l")
i = I("i")

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

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.z: H = None
        self.y: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.o: G = None
        self.q: E = None
        self.x: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: H = None
        self.o: C = None
        self.p: A = None
        self.y: D = None
        self.x: D = None
        self.q: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.w: B = None
        self.t: B = None
        self.v: A = None
        self.u: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.y: B = None
        self.w: F = None
        self.v: D = None
        self.z: A = None
        self.r: B = None
        self.o: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: D = None
        self.p: G = None
        self.w: A = None
        self.q: E = None
        self.u: B = None
        self.z: E = None
        self.x: G = None
        self.txt = txt

k = A("k")
n = B("n")
c = C("c")
b = D("b")
h = E("h")
g = F("g")
a = G("a")
l = H("l")
i = I("i")

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