class A:
    def __init__(self, txt: str):
        self.s: C = None
        self.z: H = None
        self.o: H = None
        self.x: C = None
        self.q: E = None
        self.y: J = None
        self.u: C = None
        self.w: J = None
        self.p: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.p: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.u: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.z: G = None
        self.o: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.y: G = None
        self.x: G = None
        self.z: E = None
        self.s: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: F = None
        self.q: D = None
        self.x: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: F = None
        self.o: A = None
        self.t: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: I = None
        self.p: I = None
        self.y: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.p: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.u: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.z: G = None
        self.o: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.y: G = None
        self.x: G = None
        self.z: E = None
        self.s: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: F = None
        self.q: D = None
        self.x: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: F = None
        self.o: A = None
        self.t: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: I = None
        self.p: I = None
        self.y: E = None
        self.txt = txt

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

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