class A:
    def __init__(self, txt: str):
        self.y: D = None
        self.r: I = None
        self.o: E = None
        self.q: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.p: G = None
        self.q: C = None
        self.z: D = None
        self.x: C = None
        self.u: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.z: A = None
        self.q: D = None
        self.o: C = None
        self.w: I = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.p: G = None
        self.q: C = None
        self.z: D = None
        self.x: C = None
        self.u: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.z: A = None
        self.q: D = None
        self.o: C = None
        self.w: I = None
        self.txt = txt

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

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

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

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

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

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