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

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

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

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.o: I = None
        self.p: G = None
        self.t: E = None
        self.s: B = None
        self.y: I = None
        self.v: A = None
        self.z: I = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.u: F = None
        self.v: A = None
        self.p: E = None
        self.s: D = None
        self.w: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.o: I = None
        self.p: G = None
        self.t: E = None
        self.s: B = None
        self.y: I = None
        self.v: A = None
        self.z: I = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.u: F = None
        self.v: A = None
        self.p: E = None
        self.s: D = None
        self.w: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

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

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