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

class B:
    def __init__(self, txt: str):
        self.u: J = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: J = None
        self.q: G = None
        self.s: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.v: J = None
        self.y: I = None
        self.t: I = None
        self.s: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: I = None
        self.q: I = None
        self.p: A = None
        self.v: J = None
        self.z: A = None
        self.o: I = None
        self.y: B = None
        self.u: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.y: A = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.q: H = None
        self.s: G = None
        self.u: G = None
        self.v: G = None
        self.w: F = None
        self.z: D = None
        self.o: B = None
        self.x: G = None
        self.y: F = None
        self.t: I = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: J = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: J = None
        self.q: G = None
        self.s: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.v: J = None
        self.y: I = None
        self.t: I = None
        self.s: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: I = None
        self.q: I = None
        self.p: A = None
        self.v: J = None
        self.z: A = None
        self.o: I = None
        self.y: B = None
        self.u: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.y: A = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.q: H = None
        self.s: G = None
        self.u: G = None
        self.v: G = None
        self.w: F = None
        self.z: D = None
        self.o: B = None
        self.x: G = None
        self.y: F = None
        self.t: I = None
        self.txt = txt

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

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