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

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.q: H = None
        self.z: F = None
        self.w: F = None
        self.t: J = None
        self.o: H = None
        self.r: J = None
        self.v: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.s: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: J = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.p: E = None
        self.v: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.o: D = None
        self.z: F = None
        self.v: B = None
        self.q: D = None
        self.r: I = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.q: H = None
        self.z: F = None
        self.w: F = None
        self.t: J = None
        self.o: H = None
        self.r: J = None
        self.v: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.s: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: J = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.p: E = None
        self.v: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.o: D = None
        self.z: F = None
        self.v: B = None
        self.q: D = None
        self.r: I = None
        self.txt = txt

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

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