class A:
    def __init__(self, txt: str):
        self.p: I = None
        self.v: I = None
        self.r: I = None
        self.u: G = None
        self.s: H = None
        self.o: J = None
        self.x: B = None
        self.w: H = None
        self.q: H = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.o: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: I = None
        self.o: E = None
        self.w: G = None
        self.v: B = None
        self.z: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: B = None
        self.u: J = None
        self.r: B = None
        self.p: H = None
        self.q: I = None
        self.t: E = None
        self.s: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: G = None
        self.y: D = None
        self.u: J = None
        self.p: D = None
        self.o: C = None
        self.x: C = None
        self.r: J = None
        self.t: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: G = None
        self.r: C = None
        self.v: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.o: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: I = None
        self.o: E = None
        self.w: G = None
        self.v: B = None
        self.z: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: B = None
        self.u: J = None
        self.r: B = None
        self.p: H = None
        self.q: I = None
        self.t: E = None
        self.s: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: G = None
        self.y: D = None
        self.u: J = None
        self.p: D = None
        self.o: C = None
        self.x: C = None
        self.r: J = None
        self.t: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: G = None
        self.r: C = None
        self.v: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

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

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