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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: G = None
        self.z: F = None
        self.p: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.t: D = None
        self.v: D = None
        self.o: E = None
        self.s: D = None
        self.x: H = None
        self.p: A = None
        self.txt = txt

a = A("a")
b = B("b")
j = C("j")
f = D("f")
e = E("e")
n = F("n")
m = G("m")
g = H("g")
i = I("i")

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: G = None
        self.z: F = None
        self.p: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.t: D = None
        self.v: D = None
        self.o: E = None
        self.s: D = None
        self.x: H = None
        self.p: A = None
        self.txt = txt

a = A("a")
b = B("b")
j = C("j")
f = D("f")
e = E("e")
n = F("n")
m = G("m")
g = H("g")
i = I("i")

a.s = j
a.u = j
b.x = g
b.o = f
b.y = j
j.s = e
j.r = a
j.x = a
j.q = g
j.w = f
j.y = b
j.o = n
j.z = n
f.s = i
e.v = m
e.z = n
e.p = j
n.s = a
m.q = f
g.x = b
g.y = b
g.t = j
i.t = f
i.v = f
i.s = f
i.o = e
i.x = g
i.p = a
assert e.v.q.s.txt == "i"