class A:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: I = None
        self.s: C = None
        self.v: H = None
        self.r: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.v: E = None
        self.y: I = None
        self.o: I = None
        self.z: H = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.z: B = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: I = None
        self.s: C = None
        self.v: H = None
        self.r: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.v: E = None
        self.y: I = None
        self.o: I = None
        self.z: H = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.z: B = None
        self.txt = txt

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

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

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

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