class A:
    def __init__(self, txt: str):
        self.r: G = None
        self.p: F = None
        self.v: F = None
        self.s: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.y: C = None
        self.s: A = None
        self.w: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: G = None
        self.v: H = None
        self.p: H = None
        self.z: G = None
        self.x: E = None
        self.t: F = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.r: D = None
        self.w: C = None
        self.z: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: E = None
        self.r: D = None
        self.v: C = None
        self.x: E = None
        self.u: A = None
        self.t: F = None
        self.s: A = None
        self.o: C = None
        self.txt = txt

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

l.r = h
l.p = i
l.v = j
l.s = n
e.u = n
e.y = k
e.s = l
e.w = m
k.o = n
k.t = h
n.q = h
n.z = h
n.v = g
n.p = g
n.x = m
n.t = j
m.y = k
m.r = e
m.v = j
m.s = j
m.p = n
m.z = h
m.u = h
m.t = g
j.z = e
j.r = m
j.s = h
j.t = k
j.p = g
h.z = i
h.p = l
h.t = a
g.r = n
g.w = k
g.z = a
a.p = m
a.x = m
a.r = n
a.v = k
a.o = k
a.u = l
a.s = l
a.t = j
i.z = e
i.r = m
i.s = h
i.t = k
i.p = g
assert k.t.t.r.x.t.w.o.x.y.txt == "
class A:
    def __init__(self, txt: str):
        self.r: G = None
        self.p: F = None
        self.v: F = None
        self.s: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.y: C = None
        self.s: A = None
        self.w: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: G = None
        self.v: H = None
        self.p: H = None
        self.z: G = None
        self.x: E = None
        self.t: F = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.r: D = None
        self.w: C = None
        self.z: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: E = None
        self.r: D = None
        self.v: C = None
        self.x: E = None
        self.u: A = None
        self.t: F = None
        self.s: A = None
        self.o: C = None
        self.txt = txt

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

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