class A:
    def __init__(self, txt: str):
        self.t: G = None
        self.w: G = None
        self.s: G = None
        self.q: E = None
        self.v: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.z: C = None
        self.q: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.z: C = None
        self.q: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

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

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

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

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