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

class B:
    def __init__(self, txt: str):
        self.x: H = None
        self.s: C = None
        self.o: E = None
        self.q: G = None
        self.t: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.x: D = None
        self.o: I = None
        self.y: I = None
        self.p: H = None
        self.q: D = None
        self.w: B = None
        self.t: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: H = None
        self.z: C = None
        self.r: F = None
        self.s: G = None
        self.y: I = None
        self.p: F = None
        self.u: H = None
        self.q: A = None
        self.w: E = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: E = None
        self.z: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: B = None
        self.s: G = None
        self.u: C = None
        self.x: H = None
        self.w: H = None
        self.r: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: H = None
        self.s: C = None
        self.o: E = None
        self.q: G = None
        self.t: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.x: D = None
        self.o: I = None
        self.y: I = None
        self.p: H = None
        self.q: D = None
        self.w: B = None
        self.t: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: H = None
        self.z: C = None
        self.r: F = None
        self.s: G = None
        self.y: I = None
        self.p: F = None
        self.u: H = None
        self.q: A = None
        self.w: E = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: E = None
        self.z: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: B = None
        self.s: G = None
        self.u: C = None
        self.x: H = None
        self.w: H = None
        self.r: B = None
        self.txt = txt

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

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