class A:
    def __init__(self, txt: str):
        self.p: C = None
        self.v: H = None
        self.o: J = None
        self.x: J = None
        self.y: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.s: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: B = None
        self.v: C = None
        self.s: I = None
        self.t: D = None
        self.x: C = None
        self.z: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: B = None
        self.w: F = None
        self.o: A = None
        self.y: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.s: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: B = None
        self.v: C = None
        self.s: I = None
        self.t: D = None
        self.x: C = None
        self.z: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: B = None
        self.w: F = None
        self.o: A = None
        self.y: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

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

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