class A:
    def __init__(self, txt: str):
        self.y: E = None
        self.u: C = None
        self.v: B = None
        self.z: B = None
        self.t: B = None
        self.w: G = None
        self.q: E = None
        self.o: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: B = None
        self.z: C = None
        self.p: C = None
        self.s: H = None
        self.u: F = None
        self.q: H = None
        self.o: B = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.u: C = None
        self.v: C = None
        self.q: E = None
        self.x: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: B = None
        self.z: C = None
        self.p: C = None
        self.s: H = None
        self.u: F = None
        self.q: H = None
        self.o: B = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.u: C = None
        self.v: C = None
        self.q: E = None
        self.x: F = None
        self.txt = txt

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

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