class A:
    def __init__(self, txt: str):
        self.o: H = None
        self.v: C = None
        self.u: D = None
        self.r: D = None
        self.p: B = None
        self.w: E = None
        self.t: H = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.v: G = None
        self.w: B = None
        self.u: B = None
        self.q: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: F = None
        self.y: H = None
        self.x: C = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.v: G = None
        self.w: B = None
        self.u: B = None
        self.q: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: F = None
        self.y: H = None
        self.x: C = None
        self.txt = txt

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

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

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

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