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

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

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.r: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.z: E = None
        self.w: B = None
        self.y: E = None
        self.txt = txt

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

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

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

n = A("n")
k = B("k")
m = C("m")
h = D("h")
j = E("j")
d = F("d")
l = G("l")
e = F("e")
c = G("c")
i = G("i")

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

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

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.r: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.z: E = None
        self.w: B = None
        self.y: E = None
        self.txt = txt

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

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

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

n = A("n")
k = B("k")
m = C("m")
h = D("h")
j = E("j")
d = F("d")
l = G("l")
e = F("e")
c = G("c")
i = G("i")

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