class A:
    def __init__(self, txt: str):
        self.x: C = None
        self.q: B = None
        self.t: I = None
        self.o: C = None
        self.y: H = None
        self.z: E = None
        self.r: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: H = None
        self.r: D = None
        self.o: H = None
        self.t: A = None
        self.z: E = None
        self.u: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.q: B = None
        self.u: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.u: F = None
        self.p: B = None
        self.w: G = None
        self.t: B = None
        self.r: B = None
        self.y: G = None
        self.v: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: G = None
        self.x: G = None
        self.o: F = None
        self.u: H = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: H = None
        self.r: D = None
        self.o: H = None
        self.t: A = None
        self.z: E = None
        self.u: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.q: B = None
        self.u: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.u: F = None
        self.p: B = None
        self.w: G = None
        self.t: B = None
        self.r: B = None
        self.y: G = None
        self.v: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: G = None
        self.x: G = None
        self.o: F = None
        self.u: H = None
        self.txt = txt

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

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