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

class B:
    def __init__(self, txt: str):
        self.w: D = None
        self.z: H = None
        self.q: C = None
        self.x: A = None
        self.t: A = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.o: D = None
        self.t: A = None
        self.y: I = None
        self.p: D = None
        self.x: A = None
        self.s: H = None
        self.u: H = None
        self.z: D = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: D = None
        self.z: H = None
        self.q: C = None
        self.x: A = None
        self.t: A = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.o: D = None
        self.t: A = None
        self.y: I = None
        self.p: D = None
        self.x: A = None
        self.s: H = None
        self.u: H = None
        self.z: D = None
        self.txt = txt

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

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

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

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