class A:
    def __init__(self, txt: str):
        self.r: C = None
        self.x: E = None
        self.s: G = None
        self.t: F = None
        self.w: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.q: H = None
        self.v: H = None
        self.txt = txt

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

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

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

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

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

d = A("d")
k = B("k")
e = C("e")
n = D("n")
i = E("i")
l = F("l")
b = G("b")
c = H("c")

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

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

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.q: H = None
        self.v: H = None
        self.txt = txt

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

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

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

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

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

d = A("d")
k = B("k")
e = C("e")
n = D("n")
i = E("i")
l = F("l")
b = G("b")
c = H("c")

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