class A:
    def __init__(self, txt: str):
        self.y: F = None
        self.z: G = None
        self.r: C = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.txt = txt

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

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.txt = txt

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

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

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

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