class A:
    def __init__(self, txt: str):
        self.s: F = None
        self.z: E = None
        self.w: F = None
        self.t: C = None
        self.q: G = None
        self.o: I = None
        self.r: I = None
        self.x: I = None
        self.p: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.p: D = None
        self.u: C = None
        self.v: D = None
        self.r: I = None
        self.q: H = None
        self.w: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.q: I = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.z: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: E = None
        self.z: E = None
        self.u: C = None
        self.w: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.p: D = None
        self.u: C = None
        self.v: D = None
        self.r: I = None
        self.q: H = None
        self.w: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.q: I = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.z: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: E = None
        self.z: E = None
        self.u: C = None
        self.w: H = None
        self.txt = txt

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

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