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

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

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

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.u: F = None
        self.x: B = None
        self.y: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: E = None
        self.o: E = None
        self.p: G = None
        self.r: E = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.u: F = None
        self.x: B = None
        self.y: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: E = None
        self.o: E = None
        self.p: G = None
        self.r: E = None
        self.txt = txt

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

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

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