class A:
    def __init__(self, txt: str):
        self.u: E = None
        self.t: G = None
        self.o: G = None
        self.v: D = None
        self.y: H = None
        self.x: D = None
        self.q: E = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.w: G = None
        self.s: E = None
        self.x: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.w: A = None
        self.q: G = None
        self.p: G = None
        self.o: G = None
        self.z: H = None
        self.t: D = None
        self.v: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: H = None
        self.y: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: D = None
        self.x: A = None
        self.p: G = None
        self.t: A = None
        self.w: G = None
        self.r: G = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.w: G = None
        self.s: E = None
        self.x: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.w: A = None
        self.q: G = None
        self.p: G = None
        self.o: G = None
        self.z: H = None
        self.t: D = None
        self.v: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: H = None
        self.y: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: D = None
        self.x: A = None
        self.p: G = None
        self.t: A = None
        self.w: G = None
        self.r: G = None
        self.txt = txt

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

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