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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.p: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.p: D = None
        self.t: C = None
        self.y: E = None
        self.r: A = None
        self.txt = txt

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

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.p: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.p: D = None
        self.t: C = None
        self.y: E = None
        self.r: A = None
        self.txt = txt

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

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

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

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