class A:
    def __init__(self, txt: str):
        self.x: E = None
        self.q: I = None
        self.r: E = None
        self.t: I = None
        self.s: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: H = None
        self.x: D = None
        self.q: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.y: F = None
        self.v: G = None
        self.t: G = None
        self.q: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.p: D = None
        self.o: I = None
        self.q: H = None
        self.y: B = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.x: A = None
        self.w: C = None
        self.p: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: H = None
        self.x: D = None
        self.q: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.y: F = None
        self.v: G = None
        self.t: G = None
        self.q: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.p: D = None
        self.o: I = None
        self.q: H = None
        self.y: B = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.x: A = None
        self.w: C = None
        self.p: C = None
        self.txt = txt

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

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