class A:
    def __init__(self, txt: str):
        self.s: I = None
        self.w: I = None
        self.x: H = None
        self.z: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: H = None
        self.s: E = None
        self.u: C = None
        self.r: C = None
        self.t: G = None
        self.x: C = None
        self.y: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.p: A = None
        self.v: F = None
        self.r: G = None
        self.x: I = None
        self.s: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.v: H = None
        self.p: I = None
        self.o: G = None
        self.r: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.y: F = None
        self.p: F = None
        self.v: I = None
        self.x: F = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: H = None
        self.s: E = None
        self.u: C = None
        self.r: C = None
        self.t: G = None
        self.x: C = None
        self.y: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.p: A = None
        self.v: F = None
        self.r: G = None
        self.x: I = None
        self.s: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.v: H = None
        self.p: I = None
        self.o: G = None
        self.r: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.y: F = None
        self.p: F = None
        self.v: I = None
        self.x: F = None
        self.txt = txt

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

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

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

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

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

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