class A:
    def __init__(self, txt: str):
        self.s: C = None
        self.q: E = None
        self.t: C = None
        self.v: D = None
        self.p: B = None
        self.u: G = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.t: G = None
        self.w: E = None
        self.o: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.t: G = None
        self.w: E = None
        self.o: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

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

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