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

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

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

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.s: G = None
        self.z: A = None
        self.y: A = None
        self.t: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.p: H = None
        self.u: C = None
        self.x: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.s: G = None
        self.z: A = None
        self.y: A = None
        self.t: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.p: H = None
        self.u: C = None
        self.x: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

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

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