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

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.r: A = None
        self.s: F = None
        self.p: A = None
        self.z: C = None
        self.v: B = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.u: D = None
        self.s: H = None
        self.z: I = None
        self.v: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: B = None
        self.p: B = None
        self.t: A = None
        self.s: H = None
        self.r: H = None
        self.u: F = None
        self.q: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.x: B = None
        self.s: B = None
        self.u: A = None
        self.y: D = None
        self.v: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.u: A = None
        self.r: A = None
        self.w: G = None
        self.x: B = None
        self.t: G = None
        self.z: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: C = None
        self.s: C = None
        self.p: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.r: A = None
        self.s: F = None
        self.p: A = None
        self.z: C = None
        self.v: B = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.u: D = None
        self.s: H = None
        self.z: I = None
        self.v: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: B = None
        self.p: B = None
        self.t: A = None
        self.s: H = None
        self.r: H = None
        self.u: F = None
        self.q: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.x: B = None
        self.s: B = None
        self.u: A = None
        self.y: D = None
        self.v: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.u: A = None
        self.r: A = None
        self.w: G = None
        self.x: B = None
        self.t: G = None
        self.z: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: C = None
        self.s: C = None
        self.p: A = None
        self.txt = txt

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

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