class A:
    def __init__(self, txt: str):
        self.r: B = None
        self.q: H = None
        self.p: B = None
        self.u: D = None
        self.t: B = None
        self.o: G = None
        self.s: I = None
        self.y: B = None
        self.z: G = None
        self.w: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.w: C = None
        self.r: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: H = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.p: J = None
        self.r: B = None
        self.u: F = None
        self.y: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: G = None
        self.s: A = None
        self.u: G = None
        self.q: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: G = None
        self.t: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.w: C = None
        self.r: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: H = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.p: J = None
        self.r: B = None
        self.u: F = None
        self.y: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: G = None
        self.s: A = None
        self.u: G = None
        self.q: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: G = None
        self.t: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: G = None
        self.txt = txt

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

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