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

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

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.s: I = None
        self.y: A = None
        self.z: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: G = None
        self.u: F = None
        self.v: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.t: F = None
        self.p: E = None
        self.z: E = None
        self.txt = txt

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

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

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

j.z = d
j.x = g
j.r = f
h.y = b
h.x = e
g.u = i
g.s = k
g.y = j
g.z = d
f.x = a
f.u = i
f.v = b
b.y = g
b.x = d
i.t = e
a.w = j
a.t = i
a.p = d
a.z = b
e.p = a
e.y = a
k.u = j
d.y = g
d.x = b
assert a.z.x.x.y.u.t.y.t.t.txt == "
class A:
    def __init__(self, txt: str):
        self.z: E = None
        self.x: C = None
        self.r: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.s: I = None
        self.y: A = None
        self.z: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: G = None
        self.u: F = None
        self.v: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.t: F = None
        self.p: E = None
        self.z: E = None
        self.txt = txt

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

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

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

j.z = d
j.x = g
j.r = f
h.y = b
h.x = e
g.u = i
g.s = k
g.y = j
g.z = d
f.x = a
f.u = i
f.v = b
b.y = g
b.x = d
i.t = e
a.w = j
a.t = i
a.p = d
a.z = b
e.p = a
e.y = a
k.u = j
d.y = g
d.x = b
assert a.z.x.x.y.u.t.y.t.t.txt == "e"