class A:
    def __init__(self, txt: str):
        self.o: F = None
        self.t: D = None
        self.x: G = None
        self.r: H = None
        self.s: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.o: G = None
        self.v: G = None
        self.w: I = None
        self.u: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.r: B = None
        self.w: I = None
        self.v: G = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.p: H = None
        self.o: E = None
        self.r: C = None
        self.x: G = None
        self.u: G = None
        self.v: G = None
        self.w: D = None
        self.y: D = None
        self.txt = txt

k = A("k")
l = B("l")
m = C("m")
d = D("d")
f = E("f")
e = F("e")
n = G("n")
b = H("b")
a = I("a")

k.o = e
k.t = d
k.x = n
k.r = b
k.s = m
l.x = n
l.y = k
m.t = k
m.o = n
m.v = n
m.w = a
m.u = e
d.u = m
d.p = n
d.o = a
f.y = k
f.r = l
f.w = a
f.v = n
e.y = b
e.s = n
e.w = k
n.o = f
n.q = d
n.t = d
n.p = e
b.w = n
b.o = l
a.p = b
a.o = f
a.r = m
a.x = n
a.u = n
a.v = n
a.w = d
a.y = d
assert e.s.o.y.o.w.s.txt == "
class A:
    def __init__(self, txt: str):
        self.o: F = None
        self.t: D = None
        self.x: G = None
        self.r: H = None
        self.s: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.o: G = None
        self.v: G = None
        self.w: I = None
        self.u: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.r: B = None
        self.w: I = None
        self.v: G = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.p: H = None
        self.o: E = None
        self.r: C = None
        self.x: G = None
        self.u: G = None
        self.v: G = None
        self.w: D = None
        self.y: D = None
        self.txt = txt

k = A("k")
l = B("l")
m = C("m")
d = D("d")
f = E("f")
e = F("e")
n = G("n")
b = H("b")
a = I("a")

k.o = e
k.t = d
k.x = n
k.r = b
k.s = m
l.x = n
l.y = k
m.t = k
m.o = n
m.v = n
m.w = a
m.u = e
d.u = m
d.p = n
d.o = a
f.y = k
f.r = l
f.w = a
f.v = n
e.y = b
e.s = n
e.w = k
n.o = f
n.q = d
n.t = d
n.p = e
b.w = n
b.o = l
a.p = b
a.o = f
a.r = m
a.x = n
a.u = n
a.v = n
a.w = d
a.y = d
assert e.s.o.y.o.w.s.txt == "m"