class A:
    def __init__(self, txt: str):
        self.x: G = None
        self.q: H = None
        self.v: C = None
        self.o: B = None
        self.p: B = None
        self.w: D = None
        self.t: H = None
        self.z: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: H = None
        self.o: B = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.q: G = None
        self.t: B = None
        self.u: D = None
        self.p: G = None
        self.y: A = None
        self.txt = txt

b = A("b")
c = B("c")
h = C("h")
m = D("m")
n = E("n")
d = F("d")
a = G("a")
l = H("l")
i = C("i")

b.x = a
b.q = l
b.t = l
b.v = i
b.o = c
b.p = c
b.w = m
b.z = h
c.y = a
h.y = c
h.q = n
h.p = b
m.z = n
m.p = l
m.y = a
n.t = l
n.o = c
d.q = c
a.r = m
l.q = a
l.p = a
l.t = c
l.u = m
l.y = b
i.y = c
i.q = n
i.p = b
assert m.z.t.t.txt == "
class A:
    def __init__(self, txt: str):
        self.x: G = None
        self.q: H = None
        self.v: C = None
        self.o: B = None
        self.p: B = None
        self.w: D = None
        self.t: H = None
        self.z: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: H = None
        self.o: B = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.q: G = None
        self.t: B = None
        self.u: D = None
        self.p: G = None
        self.y: A = None
        self.txt = txt

b = A("b")
c = B("c")
h = C("h")
m = D("m")
n = E("n")
d = F("d")
a = G("a")
l = H("l")
i = C("i")

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