class A:
    def __init__(self, txt: str):
        self.r: D = None
        self.w: D = None
        self.p: I = None
        self.y: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.o: F = None
        self.q: E = None
        self.v: I = None
        self.u: H = None
        self.w: G = None
        self.r: G = None
        self.z: G = None
        self.t: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.o: G = None
        self.p: I = None
        self.w: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.q: D = None
        self.o: I = None
        self.u: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: H = None
        self.z: H = None
        self.w: D = None
        self.x: D = None
        self.s: D = None
        self.p: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: D = None
        self.y: D = None
        self.s: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.o: F = None
        self.q: E = None
        self.v: I = None
        self.u: H = None
        self.w: G = None
        self.r: G = None
        self.z: G = None
        self.t: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.o: G = None
        self.p: I = None
        self.w: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.q: D = None
        self.o: I = None
        self.u: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: H = None
        self.z: H = None
        self.w: D = None
        self.x: D = None
        self.s: D = None
        self.p: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: D = None
        self.y: D = None
        self.s: D = None
        self.txt = txt

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

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