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

class B:
    def __init__(self, txt: str):
        self.y: A = None
        self.v: G = None
        self.p: H = None
        self.o: G = None
        self.x: I = None
        self.u: E = None
        self.t: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.z: A = None
        self.q: H = None
        self.o: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.s: B = None
        self.x: H = None
        self.w: B = None
        self.u: A = None
        self.o: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: G = None
        self.w: C = None
        self.p: F = None
        self.v: A = None
        self.x: E = None
        self.u: E = None
        self.q: G = None
        self.r: E = None
        self.z: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: A = None
        self.v: G = None
        self.p: H = None
        self.o: G = None
        self.x: I = None
        self.u: E = None
        self.t: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.z: A = None
        self.q: H = None
        self.o: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.s: B = None
        self.x: H = None
        self.w: B = None
        self.u: A = None
        self.o: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: G = None
        self.w: C = None
        self.p: F = None
        self.v: A = None
        self.x: E = None
        self.u: E = None
        self.q: G = None
        self.r: E = None
        self.z: A = None
        self.txt = txt

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

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

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