class A:
    def __init__(self, txt: str):
        self.v: E = None
        self.r: D = None
        self.s: C = None
        self.w: B = None
        self.z: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.z: A = None
        self.v: C = None
        self.w: G = None
        self.t: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.s: F = None
        self.r: C = None
        self.y: C = None
        self.p: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.y: C = None
        self.v: G = None
        self.r: B = None
        self.z: D = None
        self.w: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.p: B = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.z: A = None
        self.v: C = None
        self.w: G = None
        self.t: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.s: F = None
        self.r: C = None
        self.y: C = None
        self.p: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.y: C = None
        self.v: G = None
        self.r: B = None
        self.z: D = None
        self.w: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.p: B = None
        self.txt = txt

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

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

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