class A:
    def __init__(self, txt: str):
        self.v: H = None
        self.q: B = None
        self.y: C = None
        self.w: D = None
        self.p: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.o: D = None
        self.q: F = None
        self.x: G = None
        self.y: F = None
        self.p: F = None
        self.v: E = None
        self.t: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.p: H = None
        self.o: H = None
        self.q: G = None
        self.u: G = None
        self.y: B = None
        self.v: G = None
        self.x: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.y: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.s: E = None
        self.v: C = None
        self.u: D = None
        self.r: D = None
        self.w: C = None
        self.x: A = None
        self.t: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.o: D = None
        self.q: F = None
        self.x: G = None
        self.y: F = None
        self.p: F = None
        self.v: E = None
        self.t: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.p: H = None
        self.o: H = None
        self.q: G = None
        self.u: G = None
        self.y: B = None
        self.v: G = None
        self.x: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.y: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.s: E = None
        self.v: C = None
        self.u: D = None
        self.r: D = None
        self.w: C = None
        self.x: A = None
        self.t: C = None
        self.txt = txt

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

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