class A:
    def __init__(self, txt: str):
        self.r: C = None
        self.y: F = None
        self.u: E = None
        self.q: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.u: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.r: C = None
        self.z: C = None
        self.p: B = None
        self.txt = txt

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

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

c.r = m
c.y = k
c.u = d
c.q = d
n.p = e
n.y = b
n.t = m
n.z = f
m.r = h
m.u = n
e.o = c
e.w = h
d.r = k
d.u = k
d.t = k
d.o = h
d.x = e
d.s = c
d.y = m
d.z = m
d.w = n
k.p = d
h.w = k
h.z = k
h.p = n
h.r = n
f.w = c
f.r = m
f.z = m
f.p = n
b.z = f
b.t = f
b.w = m
b.u = h
b.x = h
b.q = k
b.p = c
assert h.w.p.s.y.p.w.z.z.txt == "
class A:
    def __init__(self, txt: str):
        self.r: C = None
        self.y: F = None
        self.u: E = None
        self.q: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.u: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.r: C = None
        self.z: C = None
        self.p: B = None
        self.txt = txt

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

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

c.r = m
c.y = k
c.u = d
c.q = d
n.p = e
n.y = b
n.t = m
n.z = f
m.r = h
m.u = n
e.o = c
e.w = h
d.r = k
d.u = k
d.t = k
d.o = h
d.x = e
d.s = c
d.y = m
d.z = m
d.w = n
k.p = d
h.w = k
h.z = k
h.p = n
h.r = n
f.w = c
f.r = m
f.z = m
f.p = n
b.z = f
b.t = f
b.w = m
b.u = h
b.x = h
b.q = k
b.p = c
assert h.w.p.s.y.p.w.z.z.txt == "m"