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

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

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.s: A = None
        self.o: A = None
        self.t: D = None
        self.w: E = None
        self.r: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.q: G = None
        self.t: C = None
        self.w: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.s: A = None
        self.o: A = None
        self.t: D = None
        self.w: E = None
        self.r: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.q: G = None
        self.t: C = None
        self.w: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: C = None
        self.txt = txt

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

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