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

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.q: E = None
        self.x: D = None
        self.z: F = None
        self.w: H = None
        self.y: C = None
        self.p: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.r: B = None
        self.u: A = None
        self.p: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: D = None
        self.z: H = None
        self.q: E = None
        self.u: E = None
        self.t: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: A = None
        self.s: A = None
        self.w: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.q: E = None
        self.x: D = None
        self.z: F = None
        self.w: H = None
        self.y: C = None
        self.p: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.r: B = None
        self.u: A = None
        self.p: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: D = None
        self.z: H = None
        self.q: E = None
        self.u: E = None
        self.t: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: A = None
        self.s: A = None
        self.w: D = None
        self.txt = txt

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

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