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

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

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.p: B = None
        self.z: G = None
        self.w: A = None
        self.x: B = None
        self.v: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.t: D = None
        self.r: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: A = None
        self.o: H = None
        self.t: I = None
        self.x: D = None
        self.z: F = None
        self.s: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: I = None
        self.u: D = None
        self.y: D = None
        self.z: D = None
        self.t: I = None
        self.p: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: E = None
        self.y: H = None
        self.p: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.p: B = None
        self.z: G = None
        self.w: A = None
        self.x: B = None
        self.v: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.t: D = None
        self.r: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: A = None
        self.o: H = None
        self.t: I = None
        self.x: D = None
        self.z: F = None
        self.s: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: I = None
        self.u: D = None
        self.y: D = None
        self.z: D = None
        self.t: I = None
        self.p: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: E = None
        self.y: H = None
        self.p: E = None
        self.txt = txt

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

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