class A:
    def __init__(self, txt: str):
        self.p: C = None
        self.r: C = None
        self.x: D = None
        self.o: H = None
        self.v: B = None
        self.y: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: I = None
        self.x: J = None
        self.t: D = None
        self.q: H = None
        self.y: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: J = None
        self.s: E = None
        self.x: B = None
        self.y: J = None
        self.r: B = None
        self.v: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: J = None
        self.r: F = None
        self.t: E = None
        self.x: J = None
        self.q: F = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.w: F = None
        self.z: I = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: I = None
        self.x: J = None
        self.t: D = None
        self.q: H = None
        self.y: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: J = None
        self.s: E = None
        self.x: B = None
        self.y: J = None
        self.r: B = None
        self.v: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: J = None
        self.r: F = None
        self.t: E = None
        self.x: J = None
        self.q: F = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.w: F = None
        self.z: I = None
        self.txt = txt

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

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

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

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