class A:
    def __init__(self, txt: str):
        self.u: H = None
        self.z: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: A = None
        self.s: E = None
        self.r: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: I = None
        self.t: E = None
        self.v: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: I = None
        self.x: G = None
        self.u: D = None
        self.w: H = None
        self.s: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: G = None
        self.r: F = None
        self.q: D = None
        self.w: I = None
        self.x: A = None
        self.u: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

i = A("i")
m = B("m")
b = C("b")
e = D("e")
n = E("n")
j = F("j")
d = G("d")
k = H("k")
h = I("h")

i.u = k
i.z = j
m.v = i
m.s = n
m.r = e
b.z = j
e.p = h
e.t = n
e.v = i
n.v = h
j.t = h
j.x = d
j.u = e
j.w = k
j.s = b
d.p = e
d.y = i
d.u = m
d.t = m
k.s = d
k.r = j
k.q = e
k.w = h
k.x = i
k.u = i
h.q = b
assert m.r.v.u.x.u.s.p.txt == "
class A:
    def __init__(self, txt: str):
        self.u: H = None
        self.z: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: A = None
        self.s: E = None
        self.r: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: I = None
        self.t: E = None
        self.v: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: I = None
        self.x: G = None
        self.u: D = None
        self.w: H = None
        self.s: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: G = None
        self.r: F = None
        self.q: D = None
        self.w: I = None
        self.x: A = None
        self.u: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

i = A("i")
m = B("m")
b = C("b")
e = D("e")
n = E("n")
j = F("j")
d = G("d")
k = H("k")
h = I("h")

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