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

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

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

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.p: H = None
        self.q: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: D = None
        self.t: E = None
        self.p: E = None
        self.u: H = None
        self.v: H = None
        self.x: G = None
        self.y: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: H = None
        self.x: C = None
        self.p: G = None
        self.y: E = None
        self.v: G = None
        self.s: C = None
        self.u: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.w: E = None
        self.y: A = None
        self.s: B = None
        self.z: H = None
        self.r: E = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.p: H = None
        self.q: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: D = None
        self.t: E = None
        self.p: E = None
        self.u: H = None
        self.v: H = None
        self.x: G = None
        self.y: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: H = None
        self.x: C = None
        self.p: G = None
        self.y: E = None
        self.v: G = None
        self.s: C = None
        self.u: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.w: E = None
        self.y: A = None
        self.s: B = None
        self.z: H = None
        self.r: E = None
        self.txt = txt

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

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

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