class A:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.x: G = None
        self.u: I = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.p: A = None
        self.u: D = None
        self.y: B = None
        self.w: I = None
        self.q: B = None
        self.r: A = None
        self.t: B = None
        self.x: F = None
        self.v: D = None
        self.o: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: B = None
        self.u: D = None
        self.o: D = None
        self.w: C = None
        self.z: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: D = None
        self.t: G = None
        self.s: F = None
        self.x: G = None
        self.z: H = None
        self.p: F = None
        self.y: E = None
        self.txt = txt

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

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

c.y = j
h.y = b
h.q = b
h.r = i
h.s = i
h.v = n
h.w = g
n.q = j
n.u = j
n.o = h
n.z = b
i.x = j
i.u = l
f.x = c
b.p = l
j.p = c
j.r = c
j.u = i
j.v = i
j.y = h
j.q = h
j.t = h
j.w = l
j.x = b
j.o = n
g.v = h
g.u = i
g.o = i
g.w = n
g.z = b
l.u = i
l.t = j
l.x = j
l.s = b
l.p = b
l.z = g
l.y = f
e.w = h
e.r = h
e.t = h
e.u = n
e.y = c
e.s = c
e.v = i
e.z = g
e.q = j
assert e.u.o.w.w.q.p.y.x.txt == "
class A:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.x: G = None
        self.u: I = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.p: A = None
        self.u: D = None
        self.y: B = None
        self.w: I = None
        self.q: B = None
        self.r: A = None
        self.t: B = None
        self.x: F = None
        self.v: D = None
        self.o: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: B = None
        self.u: D = None
        self.o: D = None
        self.w: C = None
        self.z: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: D = None
        self.t: G = None
        self.s: F = None
        self.x: G = None
        self.z: H = None
        self.p: F = None
        self.y: E = None
        self.txt = txt

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

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

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