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

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

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.w: A = None
        self.r: D = None
        self.z: J = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.u: A = None
        self.o: G = None
        self.v: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: I = None
        self.s: D = None
        self.w: D = None
        self.t: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: G = None
        self.v: J = None
        self.x: J = None
        self.o: B = None
        self.u: B = None
        self.r: G = None
        self.z: D = None
        self.p: E = None
        self.q: C = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.w: A = None
        self.r: D = None
        self.z: J = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.u: A = None
        self.o: G = None
        self.v: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: I = None
        self.s: D = None
        self.w: D = None
        self.t: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: G = None
        self.v: J = None
        self.x: J = None
        self.o: B = None
        self.u: B = None
        self.r: G = None
        self.z: D = None
        self.p: E = None
        self.q: C = None
        self.txt = txt

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

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

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

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