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

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.s: H = None
        self.w: E = None
        self.z: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: C = None
        self.q: E = None
        self.z: A = None
        self.o: B = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.s: H = None
        self.w: E = None
        self.z: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: C = None
        self.q: E = None
        self.z: A = None
        self.o: B = None
        self.txt = txt

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

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

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