class A:
    def __init__(self, txt: str):
        self.q: F = None
        self.t: B = None
        self.v: I = None
        self.w: C = None
        self.y: G = None
        self.u: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.u: A = None
        self.s: A = None
        self.q: F = None
        self.z: F = None
        self.p: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: C = None
        self.t: E = None
        self.z: B = None
        self.q: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: B = None
        self.t: A = None
        self.y: B = None
        self.q: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: A = None
        self.r: C = None
        self.s: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.u: A = None
        self.s: A = None
        self.q: F = None
        self.z: F = None
        self.p: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: C = None
        self.t: E = None
        self.z: B = None
        self.q: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: B = None
        self.t: A = None
        self.y: B = None
        self.q: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: A = None
        self.r: C = None
        self.s: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

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

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