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

class B:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.u: G = None
        self.o: E = None
        self.q: C = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.u: D = None
        self.z: G = None
        self.t: B = None
        self.x: G = None
        self.w: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.u: G = None
        self.o: E = None
        self.q: C = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.u: D = None
        self.z: G = None
        self.t: B = None
        self.x: G = None
        self.w: F = None
        self.txt = txt

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

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