class A:
    def __init__(self, txt: str):
        self.x: G = None
        self.u: G = None
        self.s: G = None
        self.q: C = None
        self.y: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: I = None
        self.s: B = None
        self.p: D = None
        self.x: H = None
        self.y: G = None
        self.t: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.u: I = None
        self.t: I = None
        self.txt = txt

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

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: I = None
        self.s: B = None
        self.p: D = None
        self.x: H = None
        self.y: G = None
        self.t: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.u: I = None
        self.t: I = None
        self.txt = txt

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

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

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

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

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

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

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