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

class B:
    def __init__(self, txt: str):
        self.v: I = None
        self.z: I = None
        self.s: D = None
        self.q: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: H = None
        self.o: D = None
        self.u: I = None
        self.txt = txt

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

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

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

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

j = A("j")
i = B("i")
a = C("a")
f = D("f")
g = E("g")
d = F("d")
n = G("n")
h = H("h")
c = I("c")

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

class B:
    def __init__(self, txt: str):
        self.v: I = None
        self.z: I = None
        self.s: D = None
        self.q: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: H = None
        self.o: D = None
        self.u: I = None
        self.txt = txt

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

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

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

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

j = A("j")
i = B("i")
a = C("a")
f = D("f")
g = E("g")
d = F("d")
n = G("n")
h = H("h")
c = I("c")

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