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

class B:
    def __init__(self, txt: str):
        self.o: H = None
        self.w: J = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.q: A = None
        self.w: I = None
        self.t: G = None
        self.p: H = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.r: E = None
        self.w: J = None
        self.q: A = None
        self.p: G = None
        self.z: G = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: H = None
        self.w: J = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.q: A = None
        self.w: I = None
        self.t: G = None
        self.p: H = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.r: E = None
        self.w: J = None
        self.q: A = None
        self.p: G = None
        self.z: G = None
        self.txt = txt

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

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

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