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

class B:
    def __init__(self, txt: str):
        self.y: I = None
        self.z: A = None
        self.o: E = None
        self.t: G = None
        self.q: E = None
        self.r: A = None
        self.x: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.z: H = None
        self.t: C = None
        self.w: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: C = None
        self.r: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: A = None
        self.z: D = None
        self.s: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: I = None
        self.z: A = None
        self.o: E = None
        self.t: G = None
        self.q: E = None
        self.r: A = None
        self.x: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.z: H = None
        self.t: C = None
        self.w: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: C = None
        self.r: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: A = None
        self.z: D = None
        self.s: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: E = None
        self.txt = txt

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

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