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

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

class C:
    def __init__(self, txt: str):
        self.u: G = None
        self.o: G = None
        self.w: G = None
        self.s: G = None
        self.z: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: G = None
        self.x: A = None
        self.o: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.v: B = None
        self.q: F = None
        self.o: E = None
        self.y: B = None
        self.r: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: G = None
        self.o: G = None
        self.w: G = None
        self.s: G = None
        self.z: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: G = None
        self.x: A = None
        self.o: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.v: B = None
        self.q: F = None
        self.o: E = None
        self.y: B = None
        self.r: B = None
        self.txt = txt

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

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