class A:
    def __init__(self, txt: str):
        self.u: E = None
        self.z: H = None
        self.o: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.u: E = None
        self.r: I = None
        self.x: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.t: A = None
        self.s: H = None
        self.u: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: B = None
        self.r: I = None
        self.t: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: B = None
        self.p: E = None
        self.y: A = None
        self.t: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.u: E = None
        self.r: I = None
        self.x: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.t: A = None
        self.s: H = None
        self.u: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: B = None
        self.r: I = None
        self.t: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: B = None
        self.p: E = None
        self.y: A = None
        self.t: D = None
        self.txt = txt

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

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

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