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

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.p: H = None
        self.r: B = None
        self.t: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.t: C = None
        self.q: G = None
        self.y: E = None
        self.z: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: G = None
        self.s: D = None
        self.t: C = None
        self.w: F = None
        self.x: I = None
        self.p: B = None
        self.txt = txt

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

f.s = d
f.y = d
f.q = d
f.t = a
f.p = m
f.w = m
f.z = m
f.x = n
e.o = d
j.o = f
j.s = h
n.r = e
h.z = d
h.t = d
h.p = m
h.r = e
i.x = e
i.o = m
i.w = m
d.r = j
m.t = j
m.q = d
m.z = d
m.y = h
a.z = j
a.t = j
a.o = d
a.s = n
a.w = i
a.x = l
a.p = e
l.z = j
l.t = j
l.o = d
l.s = n
l.w = i
l.x = a
l.p = e
assert i.x.o.r.o.w.txt == "
class A:
    def __init__(self, txt: str):
        self.s: G = None
        self.t: I = None
        self.p: H = None
        self.x: D = None
        self.y: G = None
        self.q: G = None
        self.w: H = None
        self.z: H = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.p: H = None
        self.r: B = None
        self.t: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.t: C = None
        self.q: G = None
        self.y: E = None
        self.z: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: G = None
        self.s: D = None
        self.t: C = None
        self.w: F = None
        self.x: I = None
        self.p: B = None
        self.txt = txt

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

f.s = d
f.y = d
f.q = d
f.t = a
f.p = m
f.w = m
f.z = m
f.x = n
e.o = d
j.o = f
j.s = h
n.r = e
h.z = d
h.t = d
h.p = m
h.r = e
i.x = e
i.o = m
i.w = m
d.r = j
m.t = j
m.q = d
m.z = d
m.y = h
a.z = j
a.t = j
a.o = d
a.s = n
a.w = i
a.x = l
a.p = e
l.z = j
l.t = j
l.o = d
l.s = n
l.w = i
l.x = a
l.p = e
assert i.x.o.r.o.w.txt == "m"