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

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.x: E = None
        self.p: F = None
        self.o: F = None
        self.s: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: I = None
        self.y: I = None
        self.p: E = None
        self.w: B = None
        self.v: F = None
        self.r: A = None
        self.u: I = None
        self.x: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.o: A = None
        self.p: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.x: E = None
        self.p: F = None
        self.o: F = None
        self.s: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: I = None
        self.y: I = None
        self.p: E = None
        self.w: B = None
        self.v: F = None
        self.r: A = None
        self.u: I = None
        self.x: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.o: A = None
        self.p: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

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

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