class A:
    def __init__(self, txt: str):
        self.s: D = None
        self.y: B = None
        self.o: D = None
        self.z: D = None
        self.p: E = None
        self.v: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.t: F = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.t: C = None
        self.o: H = None
        self.w: D = None
        self.p: A = None
        self.r: A = None
        self.y: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: B = None
        self.u: I = None
        self.q: I = None
        self.o: I = None
        self.s: A = None
        self.txt = txt

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

k.s = h
k.o = h
k.z = h
k.y = b
k.p = d
k.v = m
b.u = k
f.w = h
f.y = m
h.z = c
d.s = f
d.t = c
c.w = k
c.o = e
m.v = e
m.t = e
i.p = d
n.t = f
n.o = i
n.w = h
n.p = k
n.r = k
n.y = m
e.t = b
e.u = n
e.q = n
e.o = n
e.s = k
assert d.t.w.p.t.o.t.u.txt == "
class A:
    def __init__(self, txt: str):
        self.s: D = None
        self.y: B = None
        self.o: D = None
        self.z: D = None
        self.p: E = None
        self.v: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.t: F = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.t: C = None
        self.o: H = None
        self.w: D = None
        self.p: A = None
        self.r: A = None
        self.y: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: B = None
        self.u: I = None
        self.q: I = None
        self.o: I = None
        self.s: A = None
        self.txt = txt

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

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