class A:
    def __init__(self, txt: str):
        self.o: C = None
        self.r: F = None
        self.v: H = None
        self.u: H = None
        self.y: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: G = None
        self.v: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: F = None
        self.z: F = None
        self.o: C = None
        self.p: E = None
        self.u: G = None
        self.r: G = None
        self.w: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.q: H = None
        self.o: C = None
        self.x: G = None
        self.s: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.x: C = None
        self.r: F = None
        self.o: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.w: F = None
        self.p: E = None
        self.q: B = None
        self.u: F = None
        self.y: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: G = None
        self.v: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: F = None
        self.z: F = None
        self.o: C = None
        self.p: E = None
        self.u: G = None
        self.r: G = None
        self.w: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.q: H = None
        self.o: C = None
        self.x: G = None
        self.s: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.x: C = None
        self.r: F = None
        self.o: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.w: F = None
        self.p: E = None
        self.q: B = None
        self.u: F = None
        self.y: E = None
        self.txt = txt

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

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