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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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