class A:
    def __init__(self, txt: str):
        self.p: C = None
        self.v: D = None
        self.q: B = None
        self.o: I = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: H = None
        self.o: E = None
        self.w: F = None
        self.t: J = None
        self.r: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: J = None
        self.y: E = None
        self.v: J = None
        self.o: G = None
        self.q: A = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.y: B = None
        self.s: J = None
        self.q: G = None
        self.w: B = None
        self.t: E = None
        self.x: E = None
        self.u: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: G = None
        self.t: C = None
        self.v: J = None
        self.q: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: H = None
        self.o: E = None
        self.w: F = None
        self.t: J = None
        self.r: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: J = None
        self.y: E = None
        self.v: J = None
        self.o: G = None
        self.q: A = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.y: B = None
        self.s: J = None
        self.q: G = None
        self.w: B = None
        self.t: E = None
        self.x: E = None
        self.u: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: G = None
        self.t: C = None
        self.v: J = None
        self.q: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

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

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