class A:
    def __init__(self, txt: str):
        self.q: D = None
        self.p: E = None
        self.t: F = None
        self.x: B = None
        self.v: D = None
        self.z: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.u: D = None
        self.s: D = None
        self.q: H = None
        self.v: D = None
        self.x: F = None
        self.r: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: H = None
        self.p: C = None
        self.u: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.s: F = None
        self.r: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.w: B = None
        self.o: I = None
        self.t: F = None
        self.q: A = None
        self.y: F = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.u: D = None
        self.s: D = None
        self.q: H = None
        self.v: D = None
        self.x: F = None
        self.r: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: H = None
        self.p: C = None
        self.u: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.s: F = None
        self.r: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.w: B = None
        self.o: I = None
        self.t: F = None
        self.q: A = None
        self.y: F = None
        self.txt = txt

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

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

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