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

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

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.s: A = None
        self.r: A = None
        self.p: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.t: C = None
        self.z: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: I = None
        self.r: A = None
        self.o: A = None
        self.p: E = None
        self.q: I = None
        self.x: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: H = None
        self.q: D = None
        self.x: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.w: D = None
        self.s: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: D = None
        self.w: D = None
        self.s: C = None
        self.z: E = None
        self.r: A = None
        self.txt = txt

n = A("n")
j = B("j")
d = C("d")
l = D("l")
k = E("k")
b = F("b")
h = G("h")
i = H("i")
f = I("f")

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

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

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.s: A = None
        self.r: A = None
        self.p: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.t: C = None
        self.z: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: I = None
        self.r: A = None
        self.o: A = None
        self.p: E = None
        self.q: I = None
        self.x: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: H = None
        self.q: D = None
        self.x: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.w: D = None
        self.s: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: D = None
        self.w: D = None
        self.s: C = None
        self.z: E = None
        self.r: A = None
        self.txt = txt

n = A("n")
j = B("j")
d = C("d")
l = D("l")
k = E("k")
b = F("b")
h = G("h")
i = H("i")
f = I("f")

n.s = k
j.o = d
j.u = i
j.p = h
d.y = l
d.p = l
d.s = n
d.r = n
l.s = i
l.z = k
l.x = k
l.w = h
l.v = h
l.y = b
l.t = b
l.o = b
k.p = d
k.t = d
k.z = l
b.y = f
b.q = f
b.r = n
b.o = n
b.p = k
b.x = i
h.o = i
h.q = l
h.x = d
i.t = k
i.s = k
i.w = l
f.p = l
f.w = l
f.s = d
f.z = k
f.r = n
assert i.t.z.y.o.s.z.x.txt == "k"