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

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

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

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.s: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: I = None
        self.v: F = None
        self.u: G = None
        self.y: C = None
        self.z: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: H = None
        self.o: A = None
        self.v: B = None
        self.x: B = None
        self.q: D = None
        self.p: D = None
        self.t: D = None
        self.u: E = None
        self.w: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: I = None
        self.y: B = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.s: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: I = None
        self.v: F = None
        self.u: G = None
        self.y: C = None
        self.z: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: H = None
        self.o: A = None
        self.v: B = None
        self.x: B = None
        self.q: D = None
        self.p: D = None
        self.t: D = None
        self.u: E = None
        self.w: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: I = None
        self.y: B = None
        self.txt = txt

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

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

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

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