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

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

class C:
    def __init__(self, txt: str):
        self.r: E = None
        self.v: A = None
        self.q: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: C = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: E = None
        self.v: A = None
        self.q: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: C = None
        self.txt = txt

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

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

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

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

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