class A:
    def __init__(self, txt: str):
        self.u: B = None
        self.z: B = None
        self.r: F = None
        self.s: C = None
        self.y: G = None
        self.v: C = None
        self.w: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.w: H = None
        self.v: I = None
        self.r: I = None
        self.z: F = None
        self.p: I = None
        self.u: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.o: F = None
        self.t: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.q: B = None
        self.u: G = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.p: E = None
        self.s: D = None
        self.q: G = None
        self.u: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.w: H = None
        self.v: I = None
        self.r: I = None
        self.z: F = None
        self.p: I = None
        self.u: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.o: F = None
        self.t: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.q: B = None
        self.u: G = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.p: E = None
        self.s: D = None
        self.q: G = None
        self.u: B = None
        self.txt = txt

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

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