class A:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.v: H = None
        self.q: E = None
        self.u: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: C = None
        self.v: A = None
        self.o: E = None
        self.t: A = None
        self.z: G = None
        self.s: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.r: I = None
        self.p: D = None
        self.o: B = None
        self.t: C = None
        self.u: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.q: I = None
        self.x: F = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.v: H = None
        self.q: E = None
        self.u: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: C = None
        self.v: A = None
        self.o: E = None
        self.t: A = None
        self.z: G = None
        self.s: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.r: I = None
        self.p: D = None
        self.o: B = None
        self.t: C = None
        self.u: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.q: I = None
        self.x: F = None
        self.txt = txt

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

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

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

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