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

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

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.z: D = None
        self.u: H = None
        self.r: G = None
        self.o: F = None
        self.w: G = None
        self.p: B = None
        self.t: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.x: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.t: D = None
        self.q: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.o: C = None
        self.t: A = None
        self.z: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.z: D = None
        self.u: H = None
        self.r: G = None
        self.o: F = None
        self.w: G = None
        self.p: B = None
        self.t: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.x: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.t: D = None
        self.q: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.o: C = None
        self.t: A = None
        self.z: E = None
        self.txt = txt

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

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