class A:
    def __init__(self, txt: str):
        self.u: B = None
        self.t: B = None
        self.q: B = None
        self.z: F = None
        self.v: E = None
        self.y: D = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.p: G = None
        self.x: D = None
        self.y: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.r: B = None
        self.t: C = None
        self.z: B = None
        self.o: A = None
        self.p: C = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.p: G = None
        self.x: D = None
        self.y: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.r: B = None
        self.t: C = None
        self.z: B = None
        self.o: A = None
        self.p: C = None
        self.txt = txt

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

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