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

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

class C:
    def __init__(self, txt: str):
        self.q: H = None
        self.v: B = None
        self.x: F = None
        self.z: D = None
        self.r: E = None
        self.w: F = None
        self.u: D = None
        self.o: D = None
        self.p: J = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: J = None
        self.s: B = None
        self.x: G = None
        self.q: G = None
        self.z: B = None
        self.w: H = None
        self.y: D = None
        self.r: B = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.u: H = None
        self.o: C = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: H = None
        self.v: B = None
        self.x: F = None
        self.z: D = None
        self.r: E = None
        self.w: F = None
        self.u: D = None
        self.o: D = None
        self.p: J = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: J = None
        self.s: B = None
        self.x: G = None
        self.q: G = None
        self.z: B = None
        self.w: H = None
        self.y: D = None
        self.r: B = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.u: H = None
        self.o: C = None
        self.txt = txt

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

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

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