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

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

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: C = None
        self.u: E = None
        self.txt = txt

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

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

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

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: C = None
        self.u: E = None
        self.txt = txt

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

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