class A:
    def __init__(self, txt: str):
        self.p: H = None
        self.x: E = None
        self.w: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: I = None
        self.o: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.r: F = None
        self.o: H = None
        self.q: E = None
        self.x: G = None
        self.u: A = None
        self.p: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.z: A = None
        self.o: J = None
        self.w: B = None
        self.q: G = None
        self.t: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: J = None
        self.z: H = None
        self.w: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: A = None
        self.t: C = None
        self.v: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: F = None
        self.w: H = None
        self.t: G = None
        self.s: J = None
        self.v: A = None
        self.y: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: F = None
        self.w: D = None
        self.x: E = None
        self.q: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: I = None
        self.o: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.r: F = None
        self.o: H = None
        self.q: E = None
        self.x: G = None
        self.u: A = None
        self.p: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.z: A = None
        self.o: J = None
        self.w: B = None
        self.q: G = None
        self.t: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: J = None
        self.z: H = None
        self.w: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: A = None
        self.t: C = None
        self.v: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: F = None
        self.w: H = None
        self.t: G = None
        self.s: J = None
        self.v: A = None
        self.y: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: F = None
        self.w: D = None
        self.x: E = None
        self.q: D = None
        self.txt = txt

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

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