class A:
    def __init__(self, txt: str):
        self.z: C = None
        self.t: I = None
        self.u: D = None
        self.o: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.p: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.q: E = None
        self.v: F = None
        self.o: G = None
        self.u: H = None
        self.w: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: H = None
        self.w: F = None
        self.s: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: B = None
        self.x: D = None
        self.t: A = None
        self.w: C = None
        self.r: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: C = None
        self.x: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: C = None
        self.y: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.p: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.q: E = None
        self.v: F = None
        self.o: G = None
        self.u: H = None
        self.w: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: H = None
        self.w: F = None
        self.s: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: B = None
        self.x: D = None
        self.t: A = None
        self.w: C = None
        self.r: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: C = None
        self.x: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: C = None
        self.y: B = None
        self.txt = txt

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

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