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

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.v: H = None
        self.o: F = None
        self.r: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: G = None
        self.y: A = None
        self.s: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: C = None
        self.q: C = None
        self.p: A = None
        self.u: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: G = None
        self.z: G = None
        self.o: I = None
        self.y: D = None
        self.s: E = None
        self.r: G = None
        self.t: I = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.v: H = None
        self.o: F = None
        self.r: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: G = None
        self.y: A = None
        self.s: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: C = None
        self.q: C = None
        self.p: A = None
        self.u: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: G = None
        self.z: G = None
        self.o: I = None
        self.y: D = None
        self.s: E = None
        self.r: G = None
        self.t: I = None
        self.txt = txt

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

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

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