class A:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.x: F = None
        self.u: E = None
        self.y: D = None
        self.w: I = None
        self.z: B = None
        self.o: G = None
        self.v: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.z: B = None
        self.q: B = None
        self.p: A = None
        self.s: H = None
        self.x: E = None
        self.t: F = None
        self.u: G = None
        self.o: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: E = None
        self.s: E = None
        self.z: G = None
        self.w: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: B = None
        self.p: B = None
        self.y: F = None
        self.x: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.x: F = None
        self.u: E = None
        self.y: D = None
        self.w: I = None
        self.z: B = None
        self.o: G = None
        self.v: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.z: B = None
        self.q: B = None
        self.p: A = None
        self.s: H = None
        self.x: E = None
        self.t: F = None
        self.u: G = None
        self.o: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: E = None
        self.s: E = None
        self.z: G = None
        self.w: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: B = None
        self.p: B = None
        self.y: F = None
        self.x: B = None
        self.txt = txt

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

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