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

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

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.o: C = None
        self.r: A = None
        self.t: G = None
        self.p: H = None
        self.y: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: A = None
        self.y: D = None
        self.u: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: A = None
        self.x: G = None
        self.t: A = None
        self.y: B = None
        self.z: F = None
        self.p: E = None
        self.r: F = None
        self.txt = txt

m = A("m")
e = B("e")
l = C("l")
g = D("g")
a = E("a")
f = F("f")
k = G("k")
c = H("c")

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

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

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.o: C = None
        self.r: A = None
        self.t: G = None
        self.p: H = None
        self.y: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: A = None
        self.y: D = None
        self.u: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: A = None
        self.x: G = None
        self.t: A = None
        self.y: B = None
        self.z: F = None
        self.p: E = None
        self.r: F = None
        self.txt = txt

m = A("m")
e = B("e")
l = C("l")
g = D("g")
a = E("a")
f = F("f")
k = G("k")
c = H("c")

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