class A:
    def __init__(self, txt: str):
        self.z: C = None
        self.y: D = None
        self.q: F = None
        self.s: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.x: D = None
        self.s: F = None
        self.p: G = None
        self.o: B = None
        self.u: B = None
        self.w: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: D = None
        self.p: D = None
        self.u: D = None
        self.q: A = None
        self.o: G = None
        self.z: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.x: D = None
        self.s: F = None
        self.p: G = None
        self.o: B = None
        self.u: B = None
        self.w: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: D = None
        self.p: D = None
        self.u: D = None
        self.q: A = None
        self.o: G = None
        self.z: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

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

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