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

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

class C:
    def __init__(self, txt: str):
        self.w: G = None
        self.x: E = None
        self.u: G = None
        self.z: B = None
        self.v: A = None
        self.s: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: I = None
        self.r: C = None
        self.u: A = None
        self.w: G = None
        self.v: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.w: B = None
        self.z: A = None
        self.o: A = None
        self.t: D = None
        self.s: H = None
        self.p: A = None
        self.r: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: C = None
        self.s: C = None
        self.z: A = None
        self.y: B = None
        self.x: A = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: G = None
        self.x: E = None
        self.u: G = None
        self.z: B = None
        self.v: A = None
        self.s: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: I = None
        self.r: C = None
        self.u: A = None
        self.w: G = None
        self.v: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.w: B = None
        self.z: A = None
        self.o: A = None
        self.t: D = None
        self.s: H = None
        self.p: A = None
        self.r: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: C = None
        self.s: C = None
        self.z: A = None
        self.y: B = None
        self.x: A = None
        self.txt = txt

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

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

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