class A:
    def __init__(self, txt: str):
        self.z: C = None
        self.r: C = None
        self.w: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: G = None
        self.x: D = None
        self.t: I = None
        self.w: A = None
        self.q: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: G = None
        self.r: B = None
        self.v: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.q: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.q: E = None
        self.x: F = None
        self.u: I = None
        self.w: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: I = None
        self.z: C = None
        self.u: F = None
        self.o: A = None
        self.w: D = None
        self.t: B = None
        self.r: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: H = None
        self.y: G = None
        self.r: G = None
        self.o: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: G = None
        self.x: D = None
        self.t: I = None
        self.w: A = None
        self.q: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: G = None
        self.r: B = None
        self.v: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.q: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.q: E = None
        self.x: F = None
        self.u: I = None
        self.w: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: I = None
        self.z: C = None
        self.u: F = None
        self.o: A = None
        self.w: D = None
        self.t: B = None
        self.r: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: H = None
        self.y: G = None
        self.r: G = None
        self.o: B = None
        self.txt = txt

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

c.z = m
c.r = m
c.w = b
j.o = d
j.x = n
j.t = k
j.w = c
j.q = c
m.o = f
n.z = d
n.r = j
n.v = f
b.s = e
b.y = n
f.z = n
f.q = n
d.t = f
d.x = f
d.q = b
d.u = k
d.w = m
e.s = k
e.z = m
e.u = f
e.o = c
e.w = n
e.t = j
e.r = b
k.v = e
k.y = d
k.r = d
k.o = j
assert k.v.s.o.o.txt == "d"