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

class B:
    def __init__(self, txt: str):
        self.v: H = None
        self.u: F = None
        self.q: D = None
        self.z: C = None
        self.o: G = None
        self.t: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.u: F = None
        self.y: H = None
        self.t: F = None
        self.w: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.r: A = None
        self.w: A = None
        self.q: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: A = None
        self.w: F = None
        self.v: B = None
        self.s: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: A = None
        self.z: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: H = None
        self.u: F = None
        self.q: D = None
        self.z: C = None
        self.o: G = None
        self.t: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.u: F = None
        self.y: H = None
        self.t: F = None
        self.w: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.r: A = None
        self.w: A = None
        self.q: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: A = None
        self.w: F = None
        self.v: B = None
        self.s: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: A = None
        self.z: B = None
        self.txt = txt

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

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