class A:
    def __init__(self, txt: str):
        self.p: F = None
        self.v: E = None
        self.r: F = None
        self.o: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.p: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: J = None
        self.w: J = None
        self.v: J = None
        self.z: G = None
        self.o: G = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.s: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.p: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: J = None
        self.w: J = None
        self.v: J = None
        self.z: G = None
        self.o: G = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.s: C = None
        self.txt = txt

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

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