class A:
    def __init__(self, txt: str):
        self.z: F = None
        self.x: I = None
        self.u: C = None
        self.p: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.x: D = None
        self.o: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.t: H = None
        self.p: H = None
        self.w: D = None
        self.v: F = None
        self.u: A = None
        self.s: D = None
        self.o: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: B = None
        self.w: C = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.y: H = None
        self.t: H = None
        self.w: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.x: D = None
        self.o: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.t: H = None
        self.p: H = None
        self.w: D = None
        self.v: F = None
        self.u: A = None
        self.s: D = None
        self.o: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: B = None
        self.w: C = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.y: H = None
        self.t: H = None
        self.w: H = None
        self.txt = txt

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

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