class A:
    def __init__(self, txt: str):
        self.u: I = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: E = None
        self.w: I = None
        self.v: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.s: I = None
        self.v: C = None
        self.u: E = None
        self.txt = txt

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

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: E = None
        self.w: I = None
        self.v: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.s: I = None
        self.v: C = None
        self.u: E = None
        self.txt = txt

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

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

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