class A:
    def __init__(self, txt: str):
        self.u: F = None
        self.y: C = None
        self.x: J = None
        self.w: G = None
        self.r: I = None
        self.p: J = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: I = None
        self.q: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.q: E = None
        self.y: F = None
        self.x: J = None
        self.z: H = None
        self.s: G = None
        self.p: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.q: I = None
        self.txt = txt

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.x: C = None
        self.p: E = None
        self.z: F = None
        self.q: I = None
        self.t: E = None
        self.u: G = None
        self.v: H = None
        self.w: A = None
        self.txt = txt

m = A("m")
a = B("a")
i = C("i")
c = D("c")
b = E("b")
l = F("l")
n = G("n")
e = H("e")
h = I("h")
k = J("k")

m.u = l
m.y = i
m.x = k
m.p = k
m.w = n
m.r = h
a.t = b
a.w = m
a.p = l
a.y = l
i.v = h
i.q = b
c.t = e
c.z = e
c.q = b
c.y = l
c.x = k
c.s = n
c.p = h
b.u = a
b.q = h
l.z = a
l.s = n
l.x = n
l.t = b
n.o = b
n.p = b
e.w = l
h.w = m
h.o = n
k.x = i
k.p = b
k.t = b
k.z = l
k.q = h
k.u = n
k.v = e
k.w = m
assert m.p.v.w.t.u.t.u.y.s.txt == "
class A:
    def __init__(self, txt: str):
        self.u: F = None
        self.y: C = None
        self.x: J = None
        self.w: G = None
        self.r: I = None
        self.p: J = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: I = None
        self.q: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.q: E = None
        self.y: F = None
        self.x: J = None
        self.z: H = None
        self.s: G = None
        self.p: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.q: I = None
        self.txt = txt

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.x: C = None
        self.p: E = None
        self.z: F = None
        self.q: I = None
        self.t: E = None
        self.u: G = None
        self.v: H = None
        self.w: A = None
        self.txt = txt

m = A("m")
a = B("a")
i = C("i")
c = D("c")
b = E("b")
l = F("l")
n = G("n")
e = H("e")
h = I("h")
k = J("k")

m.u = l
m.y = i
m.x = k
m.p = k
m.w = n
m.r = h
a.t = b
a.w = m
a.p = l
a.y = l
i.v = h
i.q = b
c.t = e
c.z = e
c.q = b
c.y = l
c.x = k
c.s = n
c.p = h
b.u = a
b.q = h
l.z = a
l.s = n
l.x = n
l.t = b
n.o = b
n.p = b
e.w = l
h.w = m
h.o = n
k.x = i
k.p = b
k.t = b
k.z = l
k.q = h
k.u = n
k.v = e
k.w = m
assert m.p.v.w.t.u.t.u.y.s.txt == "n"