class A:
    def __init__(self, txt: str):
        self.y: F = None
        self.z: F = None
        self.o: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: H = None
        self.p: G = None
        self.y: B = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.y: H = None
        self.w: A = None
        self.o: D = None
        self.r: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: E = None
        self.x: B = None
        self.r: C = None
        self.z: C = None
        self.v: C = None
        self.txt = txt

d = A("d")
i = B("i")
n = C("n")
a = D("a")
f = E("f")
h = F("h")
b = G("b")
c = H("c")
e = A("e")

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

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

class C:
    def __init__(self, txt: str):
        self.x: H = None
        self.p: G = None
        self.y: B = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.y: H = None
        self.w: A = None
        self.o: D = None
        self.r: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: E = None
        self.x: B = None
        self.r: C = None
        self.z: C = None
        self.v: C = None
        self.txt = txt

d = A("d")
i = B("i")
n = C("n")
a = D("a")
f = E("f")
h = F("h")
b = G("b")
c = H("c")
e = A("e")

d.y = h
d.z = h
d.o = c
i.y = h
n.x = c
n.p = b
n.y = i
a.r = h
a.y = n
a.w = n
a.u = i
f.t = b
f.u = c
h.t = i
h.y = i
h.r = i
h.s = i
h.p = c
h.z = f
h.x = f
b.q = f
b.y = c
b.w = d
b.r = d
b.o = a
c.s = f
c.x = i
c.r = n
c.z = n
c.v = n
e.y = h
e.z = h
e.o = c
assert i.y.x.u.s.t.o.w.txt == "n"