class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.x: B = None
        self.v: D = None
        self.z: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.z: E = None
        self.r: E = None
        self.y: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.s: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.t: A = None
        self.y: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.w: B = None
        self.v: B = None
        self.x: E = None
        self.t: B = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.z: E = None
        self.r: E = None
        self.y: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.s: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.t: A = None
        self.y: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.w: B = None
        self.v: B = None
        self.x: E = None
        self.t: B = None
        self.txt = txt

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

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

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