class A:
    def __init__(self, txt: str):
        self.z: C = None
        self.u: G = None
        self.y: F = None
        self.t: D = None
        self.s: D = None
        self.v: F = None
        self.w: J = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: H = None
        self.v: A = None
        self.q: B = None
        self.r: J = None
        self.w: B = None
        self.p: B = None
        self.o: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.o: B = None
        self.p: E = None
        self.y: F = None
        self.q: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: D = None
        self.p: C = None
        self.w: E = None
        self.o: G = None
        self.t: G = None
        self.v: J = None
        self.q: F = None
        self.s: A = None
        self.z: E = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.r: H = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: H = None
        self.v: A = None
        self.q: B = None
        self.r: J = None
        self.w: B = None
        self.p: B = None
        self.o: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.o: B = None
        self.p: E = None
        self.y: F = None
        self.q: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: D = None
        self.p: C = None
        self.w: E = None
        self.o: G = None
        self.t: G = None
        self.v: J = None
        self.q: F = None
        self.s: A = None
        self.z: E = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.r: H = None
        self.txt = txt

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

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