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

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

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.q: C = None
        self.o: D = None
        self.w: G = None
        self.r: G = None
        self.x: C = None
        self.v: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.q: C = None
        self.o: D = None
        self.w: G = None
        self.r: G = None
        self.x: C = None
        self.v: C = None
        self.txt = txt

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

d.u = l
d.w = l
d.o = h
d.y = a
d.x = a
d.r = a
f.v = k
f.x = c
l.w = a
i.w = h
i.o = h
i.t = h
i.q = l
i.p = l
i.y = d
c.u = a
h.t = a
k.v = i
a.t = h
a.q = l
a.x = l
a.v = l
a.o = i
a.w = k
a.r = k
assert i.y.w.w.w.v.txt == "i"