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

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.v: C = None
        self.u: D = None
        self.p: E = None
        self.x: E = None
        self.t: I = None
        self.y: I = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.v: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: I = None
        self.t: H = None
        self.v: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: A = None
        self.x: E = None
        self.z: F = None
        self.t: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: F = None
        self.t: E = None
        self.r: E = None
        self.y: E = None
        self.x: D = None
        self.s: F = None
        self.q: G = None
        self.z: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.v: C = None
        self.u: D = None
        self.p: E = None
        self.x: E = None
        self.t: I = None
        self.y: I = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.v: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: I = None
        self.t: H = None
        self.v: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: A = None
        self.x: E = None
        self.z: F = None
        self.t: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: F = None
        self.t: E = None
        self.r: E = None
        self.y: E = None
        self.x: D = None
        self.s: F = None
        self.q: G = None
        self.z: D = None
        self.txt = txt

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

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