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

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.s: D = None
        self.q: D = None
        self.u: C = None
        self.w: A = None
        self.z: D = None
        self.y: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.y: G = None
        self.x: A = None
        self.r: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.o: E = None
        self.q: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.u: B = None
        self.s: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.s: D = None
        self.q: D = None
        self.u: C = None
        self.w: A = None
        self.z: D = None
        self.y: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.y: G = None
        self.x: A = None
        self.r: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.o: E = None
        self.q: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.u: B = None
        self.s: D = None
        self.txt = txt

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

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