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

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

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.q: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.q: D = None
        self.u: E = None
        self.p: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.u: G = None
        self.w: G = None
        self.t: F = None
        self.p: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: F = None
        self.z: A = None
        self.o: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

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

i.u = h
i.o = b
i.p = j
h.s = j
h.z = j
h.o = n
b.o = i
d.s = e
d.p = e
d.v = i
d.t = h
d.w = h
d.r = h
d.u = n
d.z = b
n.w = b
n.q = m
f.r = d
f.q = d
f.u = n
f.p = h
e.u = m
e.s = d
e.p = d
e.w = i
e.y = i
e.v = f
e.z = g
e.t = h
e.o = j
m.o = h
m.u = e
m.w = e
m.t = f
m.p = d
j.p = f
j.z = i
j.o = d
g.q = e
assert b.o.p.p.u.w.o.p.o.txt == "
class A:
    def __init__(self, txt: str):
        self.u: B = None
        self.o: C = None
        self.p: I = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.q: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.q: D = None
        self.u: E = None
        self.p: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.u: G = None
        self.w: G = None
        self.t: F = None
        self.p: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: F = None
        self.z: A = None
        self.o: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

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

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