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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.x: H = None
        self.s: H = None
        self.t: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.x: F = None
        self.q: D = None
        self.v: F = None
        self.z: F = None
        self.u: I = None
        self.s: C = None
        self.w: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: G = None
        self.v: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: E = None
        self.p: E = None
        self.x: C = None
        self.q: E = None
        self.t: D = None
        self.y: D = None
        self.s: G = None
        self.o: B = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.x: H = None
        self.s: H = None
        self.t: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.x: F = None
        self.q: D = None
        self.v: F = None
        self.z: F = None
        self.u: I = None
        self.s: C = None
        self.w: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: G = None
        self.v: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: E = None
        self.p: E = None
        self.x: C = None
        self.q: E = None
        self.t: D = None
        self.y: D = None
        self.s: G = None
        self.o: B = None
        self.txt = txt

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

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