class A:
    def __init__(self, txt: str):
        self.r: D = None
        self.u: C = None
        self.q: I = None
        self.v: H = None
        self.y: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.v: H = None
        self.p: H = None
        self.y: H = None
        self.s: F = None
        self.q: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: I = None
        self.z: D = None
        self.p: A = None
        self.o: I = None
        self.w: B = None
        self.t: D = None
        self.s: J = None
        self.q: A = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.u: A = None
        self.x: H = None
        self.r: G = None
        self.o: E = None
        self.v: J = None
        self.t: C = None
        self.q: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: B = None
        self.o: I = None
        self.z: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.v: H = None
        self.p: H = None
        self.y: H = None
        self.s: F = None
        self.q: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: I = None
        self.z: D = None
        self.p: A = None
        self.o: I = None
        self.w: B = None
        self.t: D = None
        self.s: J = None
        self.q: A = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.u: A = None
        self.x: H = None
        self.r: G = None
        self.o: E = None
        self.v: J = None
        self.t: C = None
        self.q: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: B = None
        self.o: I = None
        self.z: A = None
        self.txt = txt

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

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