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

class B:
    def __init__(self, txt: str):
        self.x: D = None
        self.s: D = None
        self.p: F = None
        self.z: D = None
        self.r: A = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: A = None
        self.v: E = None
        self.txt = txt

a = A("a")
f = B("f")
m = C("m")
e = D("e")
c = E("c")
h = F("h")
k = G("k")
g = D("g")
b = A("b")
d = C("d")

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

class B:
    def __init__(self, txt: str):
        self.x: D = None
        self.s: D = None
        self.p: F = None
        self.z: D = None
        self.r: A = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: A = None
        self.v: E = None
        self.txt = txt

a = A("a")
f = B("f")
m = C("m")
e = D("e")
c = E("c")
h = F("h")
k = G("k")
g = D("g")
b = A("b")
d = C("d")

a.y = c
a.s = h
f.x = e
f.s = g
f.z = g
f.p = h
f.r = a
m.v = f
m.x = f
m.t = f
m.y = e
m.w = d
e.p = d
e.x = k
e.y = k
e.s = c
e.z = c
e.v = h
e.u = g
c.y = d
h.x = d
h.y = c
h.o = c
h.u = f
h.p = f
h.w = a
k.r = a
k.v = c
g.p = d
g.x = k
g.y = k
g.s = c
g.z = c
g.v = h
g.u = e
b.y = c
b.s = h
d.v = f
d.x = f
d.t = f
d.y = g
d.w = m
assert a.s.w.s.w.y.txt == "c"