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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.t: B = None
        self.z: D = None
        self.x: C = None
        self.txt = txt

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.t: B = None
        self.z: D = None
        self.x: C = None
        self.txt = txt

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

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