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

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.q: A = None
        self.u: A = None
        self.o: B = None
        self.y: D = None
        self.p: F = None
        self.s: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.z: G = None
        self.y: F = None
        self.o: H = None
        self.r: C = None
        self.t: E = None
        self.x: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.z: C = None
        self.t: A = None
        self.u: A = None
        self.y: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.p: E = None
        self.s: E = None
        self.x: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: I = None
        self.o: H = None
        self.v: F = None
        self.r: E = None
        self.u: J = None
        self.w: F = None
        self.z: B = None
        self.s: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: J = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.q: A = None
        self.u: A = None
        self.o: B = None
        self.y: D = None
        self.p: F = None
        self.s: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.z: G = None
        self.y: F = None
        self.o: H = None
        self.r: C = None
        self.t: E = None
        self.x: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.z: C = None
        self.t: A = None
        self.u: A = None
        self.y: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.p: E = None
        self.s: E = None
        self.x: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: I = None
        self.o: H = None
        self.v: F = None
        self.r: E = None
        self.u: J = None
        self.w: F = None
        self.z: B = None
        self.s: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: J = None
        self.txt = txt

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

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

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

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