class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.z: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.w: D = None
        self.v: A = None
        self.r: D = None
        self.p: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.o: D = None
        self.w: G = None
        self.z: D = None
        self.t: B = None
        self.txt = txt

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

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

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

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

m = A("m")
c = B("c")
k = C("k")
h = D("h")
l = E("l")
d = F("d")
i = G("i")
j = H("j")
b = D("b")
g = B("g")

m.u = b
m.z = j
c.t = h
c.w = h
c.r = h
c.v = m
c.p = l
k.y = l
h.v = i
h.w = i
h.o = b
h.z = b
h.t = g
l.z = i
l.o = i
l.u = i
d.z = m
d.u = i
i.q = b
i.v = c
i.o = c
i.y = j
i.p = l
i.z = k
j.v = m
b.v = i
b.w = i
b.o = h
b.z = h
b.t = c
g.t = b
g.r = b
g.w = h
g.v = m
g.p = l
assert g.v.z.v.txt == "
class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.z: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.w: D = None
        self.v: A = None
        self.r: D = None
        self.p: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.o: D = None
        self.w: G = None
        self.z: D = None
        self.t: B = None
        self.txt = txt

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

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

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

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

m = A("m")
c = B("c")
k = C("k")
h = D("h")
l = E("l")
d = F("d")
i = G("i")
j = H("j")
b = D("b")
g = B("g")

m.u = b
m.z = j
c.t = h
c.w = h
c.r = h
c.v = m
c.p = l
k.y = l
h.v = i
h.w = i
h.o = b
h.z = b
h.t = g
l.z = i
l.o = i
l.u = i
d.z = m
d.u = i
i.q = b
i.v = c
i.o = c
i.y = j
i.p = l
i.z = k
j.v = m
b.v = i
b.w = i
b.o = h
b.z = h
b.t = c
g.t = b
g.r = b
g.w = h
g.v = m
g.p = l
assert g.v.z.v.txt == "m"