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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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