class A:
    def __init__(self, txt: str):
        self.y: D = None
        self.q: B = None
        self.p: G = None
        self.z: I = None
        self.r: D = None
        self.s: B = None
        self.w: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.v: E = None
        self.w: F = None
        self.z: D = None
        self.q: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.s: E = None
        self.u: G = None
        self.p: E = None
        self.x: H = None
        self.r: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.o: H = None
        self.w: E = None
        self.x: C = None
        self.p: A = None
        self.z: I = None
        self.v: H = None
        self.u: D = None
        self.r: B = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: G = None
        self.w: C = None
        self.s: B = None
        self.x: I = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.v: E = None
        self.w: F = None
        self.z: D = None
        self.q: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.s: E = None
        self.u: G = None
        self.p: E = None
        self.x: H = None
        self.r: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.o: H = None
        self.w: E = None
        self.x: C = None
        self.p: A = None
        self.z: I = None
        self.v: H = None
        self.u: D = None
        self.r: B = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: G = None
        self.w: C = None
        self.s: B = None
        self.x: I = None
        self.txt = txt

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

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