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

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

class C:
    def __init__(self, txt: str):
        self.o: I = None
        self.z: A = None
        self.q: D = None
        self.t: H = None
        self.s: H = None
        self.u: B = None
        self.r: J = None
        self.v: E = None
        self.y: A = None
        self.p: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: A = None
        self.x: J = None
        self.y: B = None
        self.w: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: E = None
        self.x: A = None
        self.y: B = None
        self.z: C = None
        self.v: B = None
        self.t: E = None
        self.w: J = None
        self.p: F = None
        self.o: F = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.u: E = None
        self.r: I = None
        self.y: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: I = None
        self.z: A = None
        self.q: D = None
        self.t: H = None
        self.s: H = None
        self.u: B = None
        self.r: J = None
        self.v: E = None
        self.y: A = None
        self.p: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: A = None
        self.x: J = None
        self.y: B = None
        self.w: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: E = None
        self.x: A = None
        self.y: B = None
        self.z: C = None
        self.v: B = None
        self.t: E = None
        self.w: J = None
        self.p: F = None
        self.o: F = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.u: E = None
        self.r: I = None
        self.y: B = None
        self.txt = txt

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

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