class A:
    def __init__(self, txt: str):
        self.u: C = None
        self.x: D = None
        self.s: D = None
        self.y: I = None
        self.w: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.y: D = None
        self.p: A = None
        self.o: F = None
        self.t: D = None
        self.r: H = None
        self.v: F = None
        self.q: D = None
        self.u: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: H = None
        self.w: H = None
        self.q: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.q: H = None
        self.v: C = None
        self.z: E = None
        self.r: G = None
        self.w: H = None
        self.u: B = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.y: D = None
        self.p: A = None
        self.o: F = None
        self.t: D = None
        self.r: H = None
        self.v: F = None
        self.q: D = None
        self.u: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: H = None
        self.w: H = None
        self.q: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.q: H = None
        self.v: C = None
        self.z: E = None
        self.r: G = None
        self.w: H = None
        self.u: B = None
        self.txt = txt

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

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

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

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

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