class A:
    def __init__(self, txt: str):
        self.o: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: I = None
        self.z: E = None
        self.t: E = None
        self.txt = txt

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

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: I = None
        self.z: E = None
        self.t: E = None
        self.txt = txt

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

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

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

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

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

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

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

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