class A:
    def __init__(self, txt: str):
        self.x: B = None
        self.q: H = None
        self.w: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.s: D = None
        self.w: F = None
        self.v: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.o: E = None
        self.w: F = None
        self.v: D = None
        self.s: F = None
        self.p: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.z: A = None
        self.u: E = None
        self.p: C = None
        self.o: A = None
        self.v: G = None
        self.w: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.s: D = None
        self.w: F = None
        self.v: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.o: E = None
        self.w: F = None
        self.v: D = None
        self.s: F = None
        self.p: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.z: A = None
        self.u: E = None
        self.p: C = None
        self.o: A = None
        self.v: G = None
        self.w: D = None
        self.txt = txt

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

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