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

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.y: D = None
        self.u: C = None
        self.w: E = None
        self.z: E = None
        self.t: E = None
        self.x: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.t: A = None
        self.y: A = None
        self.x: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: C = None
        self.txt = txt

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

e = A("e")
a = B("a")
n = C("n")
h = D("h")
i = E("i")
m = F("m")
f = G("f")

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

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.y: D = None
        self.u: C = None
        self.w: E = None
        self.z: E = None
        self.t: E = None
        self.x: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.t: A = None
        self.y: A = None
        self.x: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: C = None
        self.txt = txt

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

e = A("e")
a = B("a")
n = C("n")
h = D("h")
i = E("i")
m = F("m")
f = G("f")

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