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

class B:
    def __init__(self, txt: str):
        self.z: J = None
        self.o: F = None
        self.y: D = None
        self.p: G = None
        self.w: H = None
        self.r: H = None
        self.v: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.y: B = None
        self.w: H = None
        self.u: E = None
        self.p: G = None
        self.r: A = None
        self.v: G = None
        self.t: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.q: A = None
        self.s: J = None
        self.u: B = None
        self.z: H = None
        self.w: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: J = None
        self.y: H = None
        self.s: B = None
        self.r: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: A = None
        self.t: E = None
        self.u: A = None
        self.s: F = None
        self.p: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

a = A("a")
e = B("e")
k = C("k")
d = D("d")
m = E("m")
l = F("l")
j = G("j")
i = H("i")
f = I("f")
g = J("g")

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

class B:
    def __init__(self, txt: str):
        self.z: J = None
        self.o: F = None
        self.y: D = None
        self.p: G = None
        self.w: H = None
        self.r: H = None
        self.v: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.y: B = None
        self.w: H = None
        self.u: E = None
        self.p: G = None
        self.r: A = None
        self.v: G = None
        self.t: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.q: A = None
        self.s: J = None
        self.u: B = None
        self.z: H = None
        self.w: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: J = None
        self.y: H = None
        self.s: B = None
        self.r: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: A = None
        self.t: E = None
        self.u: A = None
        self.s: F = None
        self.p: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

a = A("a")
e = B("e")
k = C("k")
d = D("d")
m = E("m")
l = F("l")
j = G("j")
i = H("i")
f = I("f")
g = J("g")

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