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

class B:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.o: I = None
        self.v: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: J = None
        self.w: C = None
        self.v: E = None
        self.u: J = None
        self.x: B = None
        self.q: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.p: C = None
        self.z: C = None
        self.o: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.o: J = None
        self.z: A = None
        self.s: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: E = None
        self.t: D = None
        self.v: A = None
        self.z: B = None
        self.r: D = None
        self.x: I = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.o: I = None
        self.v: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: J = None
        self.w: C = None
        self.v: E = None
        self.u: J = None
        self.x: B = None
        self.q: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.p: C = None
        self.z: C = None
        self.o: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.o: J = None
        self.z: A = None
        self.s: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: E = None
        self.t: D = None
        self.v: A = None
        self.z: B = None
        self.r: D = None
        self.x: I = None
        self.txt = txt

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

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