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

class B:
    def __init__(self, txt: str):
        self.y: H = None
        self.w: A = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.p: E = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.q: H = None
        self.w: C = None
        self.y: H = None
        self.t: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: H = None
        self.w: A = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.p: E = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.q: H = None
        self.w: C = None
        self.y: H = None
        self.t: D = None
        self.txt = txt

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

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