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

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

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

class D:
    def __init__(self, txt: str):
        self.r: G = None
        self.w: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.z: A = None
        self.r: C = None
        self.s: G = None
        self.w: A = None
        self.x: A = None
        self.p: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: B = None
        self.y: C = None
        self.txt = txt

b = A("b")
f = B("f")
d = C("d")
m = D("m")
n = E("n")
k = F("k")
e = G("e")
j = H("j")
l = E("l")

b.z = m
b.v = m
b.w = f
b.u = d
f.y = k
f.u = b
f.r = e
f.w = e
f.x = j
d.u = j
d.w = f
d.r = f
d.s = f
d.v = l
d.q = e
d.z = b
m.r = e
m.w = f
n.s = l
n.z = d
k.q = e
k.s = e
k.z = b
k.w = b
k.x = b
k.r = d
k.p = f
e.y = m
e.u = m
e.w = b
e.p = n
j.v = f
j.y = d
l.s = n
l.z = d
assert b.u.s.x.v.w.p.s.z.q.txt == "
class A:
    def __init__(self, txt: str):
        self.z: D = None
        self.w: B = None
        self.v: D = None
        self.u: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.r: G = None
        self.w: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.z: A = None
        self.r: C = None
        self.s: G = None
        self.w: A = None
        self.x: A = None
        self.p: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: B = None
        self.y: C = None
        self.txt = txt

b = A("b")
f = B("f")
d = C("d")
m = D("m")
n = E("n")
k = F("k")
e = G("e")
j = H("j")
l = E("l")

b.z = m
b.v = m
b.w = f
b.u = d
f.y = k
f.u = b
f.r = e
f.w = e
f.x = j
d.u = j
d.w = f
d.r = f
d.s = f
d.v = l
d.q = e
d.z = b
m.r = e
m.w = f
n.s = l
n.z = d
k.q = e
k.s = e
k.z = b
k.w = b
k.x = b
k.r = d
k.p = f
e.y = m
e.u = m
e.w = b
e.p = n
j.v = f
j.y = d
l.s = n
l.z = d
assert b.u.s.x.v.w.p.s.z.q.txt == "e"