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

class B:
    def __init__(self, txt: str):
        self.r: G = None
        self.q: C = None
        self.p: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.t: H = None
        self.z: E = None
        self.v: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.r: G = None
        self.w: I = None
        self.p: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: I = None
        self.t: E = None
        self.s: G = None
        self.z: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: G = None
        self.q: C = None
        self.p: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.t: H = None
        self.z: E = None
        self.v: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.r: G = None
        self.w: I = None
        self.p: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: I = None
        self.t: E = None
        self.s: G = None
        self.z: D = None
        self.txt = txt

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

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

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