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

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.v: I = None
        self.t: F = None
        self.y: C = None
        self.x: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: G = None
        self.u: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: J = None
        self.z: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.w: E = None
        self.q: E = None
        self.x: J = None
        self.t: D = None
        self.v: E = None
        self.y: F = None
        self.o: D = None
        self.u: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: G = None
        self.q: D = None
        self.t: F = None
        self.p: I = None
        self.y: C = None
        self.s: D = None
        self.v: A = None
        self.x: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: A = None
        self.v: H = None
        self.q: G = None
        self.u: J = None
        self.o: J = None
        self.t: C = None
        self.z: E = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.v: I = None
        self.t: F = None
        self.y: C = None
        self.x: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: G = None
        self.u: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: J = None
        self.z: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.w: E = None
        self.q: E = None
        self.x: J = None
        self.t: D = None
        self.v: E = None
        self.y: F = None
        self.o: D = None
        self.u: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: G = None
        self.q: D = None
        self.t: F = None
        self.p: I = None
        self.y: C = None
        self.s: D = None
        self.v: A = None
        self.x: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: A = None
        self.v: H = None
        self.q: G = None
        self.u: J = None
        self.o: J = None
        self.t: C = None
        self.z: E = None
        self.txt = txt

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

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

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