class A:
    def __init__(self, txt: str):
        self.p: E = None
        self.s: G = None
        self.r: B = None
        self.y: D = None
        self.u: E = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.q: E = None
        self.w: J = None
        self.r: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: C = None
        self.z: J = None
        self.o: J = None
        self.y: I = None
        self.txt = txt

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

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.q: E = None
        self.w: J = None
        self.r: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: C = None
        self.z: J = None
        self.o: J = None
        self.y: I = None
        self.txt = txt

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

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

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

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